Text.Language.Classifier.Fasttext.Entry (Text v0.5.0)

Copy Markdown View Source

A single dictionary entry parsed from a fastText model file.

An entry is either a vocabulary word (type: :word) or a label (type: :label). For lid.176, label entries hold strings like "__label__en", "__label__zh-Hans", etc.

See docs/lid176_binary_format.md (Section 3) for the byte layout.

Summary

Types

entry_type()

@type entry_type() :: :word | :label

t()

@type t() :: %Text.Language.Classifier.Fasttext.Entry{
  count: non_neg_integer(),
  type: entry_type(),
  word: String.t()
}