What Is fastText? Representing Rare and Unseen Words with Character n-grams
How fastText uses character n-grams, forms vectors for out-of-vocabulary words, and where the method helps or falls short.
fastText extends word embeddings with character n-grams. It learns vectors for subword pieces and represents a word by combining them, so words with shared pieces can share learned information. This can help with rare forms and can produce a vector for an out-of-vocabulary token, but a vector is not proof that its meaning is correct. In Gensim 4.3.3, FastText defaults to character n-gram lengths 3–6; treat these as implementation defaults, not universal settings. Train on tokenized, domain-relevant text, then evaluate rare forms, real unseen inputs, and the downstream task. Compared with basic Word2Vec, fastText shares subword parameters; it still gives static word representations and does not resolve context-dependent senses or sentence syntax. Typos and unrelated strings may get poor vectors. The code example was not run.