Our strategy is to choose a set of "interesting" substrings W. For each w ∈ W, define a feature function "How many times does w appear as a substring of v?"
f (v) is simply a vector of counts (nonnegative integers), indexed by the substrings in W. A natural choice of W is the set of all n-grams for fixed n. In this case, Q turns out to be equivalent to the family of n-gram language models.