Alpha constructor

Alpha({
  1. double termDecay = 0.1,
})

Construct Alpha

see: TermMapping.termDecay for explanation of termDecay usage.

Implementation

Alpha({double termDecay = 0.1})
    : super(
          (String str, bool caseSensitive, bool unicode) =>
              LinkedHashSet<String>.from(
                  (unicode ? _matchAlphaUnicode : _matchAlphaAscii)
                      .allMatches(caseSensitive ? str : str.toLowerCase())
                      .map((m) => m[0])),
          termDecay);