FastText represents words through character n-grams, or subwords, instead of relying only on complete words. This lets it build useful vectors for rare, misspelled, partial, and previously unseen words. section 6.4.2
Like Word2Vec and GloVe, fastText learns from raw, domain-specific text without labeled examples. A medical corpus can produce embeddings suited to medical users, while Wikipedia or news provides broader coverage. section 6.3.2
Its subword strategy provides three practical advantages:
- Represents fragments such as the 2- and 3-character grams extracted from “whisper.” section 6.4.2
- Combines familiar subwords to represent a rare word such as “Superwoman,” reducing generic out-of-vocabulary vectors. section 6.4.2
- Provides pretrained models for 294 languages, although vocabulary and accuracy vary with the available Wikipedia data. section 6.4.2
Inspecting pretrained vectors
A Python workflow can load pretrained fastText vectors, inspect the embedding table, and retrieve the 300-dimensional vector for “prosocial” with `load_fasttext()` and `df.loc['prosocial']`.
