How to combine n-grams into one vocabulary in Spark?
<p>Wondering if there is a built-in Spark feature to combine 1-, 2-, n-gram features into a single vocabulary. Setting <code>n=2</code> in <code>NGram</code> followed by invocation of <code>CountVectorizer</code> results in a dictionary containing only 2-grams. What I really want is to combine all frequent 1-grams, 2-grams, etc into one dictionary for my corpus.</p>