kGrams method Null safety

Map<String, Set<String>> kGrams(
  1. [int k = 2]
)

Returns a hashmap of k-grams to terms from the collection of tokens.

Implementation

Map<String, Set<String>> kGrams([int k = 2]) => terms.toKGramsMap(k);