Returns a hashmap of k-grams to terms from the collection of tokens.
Map<KGram, Set<Term>> kGrams([int k = 2]) => terms.toKGramsMap(k);