yake library

YAKE! — Yet Another Keyword Extractor, in pure Dart.

A port of the algorithm from Campos et al., "YAKE! Keyword extraction from single documents using multiple local features" (Information Sciences 509, 2020); the reference implementation is github.com/LIAAD/yake. YAKE is the extractor whose requirements fit a client app: single document (no corpus statistics), unsupervised (no model download), and language-independent apart from a stopword list, which the caller supplies.

final yake = Yake(stopwords: englishStopwords);
for (final k in yake.extract(text, top: 10)) {
  print('${k.keyword}  ${k.score}'); // lower score = better
}

For accented languages, pass a folding function and a folded stoplist so "Được"/"duoc" match — foldDiacritics covers Latin-1 and full Vietnamese:

Yake(stopwords: myFoldedStopwords, fold: foldDiacritics)

Classes

Yake
YakeKeyword
One extracted keyword (possibly multi-word) with its YAKE score — lower is better.

Constants

englishStopwords → const Set<String>

Functions

foldDiacritics(String input) String