fastText is a library for efficient text classification and word representation learning by Facebook. It extends Word2Vec by incorporating subword information, which allows it to generate meaningful embeddings for rare and out-of-vocabulary words.
For example, the word “apple” could be represented as: the word itself: apple and character n-grams: ap, app, appl, apple, ppl, pple, ple, le. Each of these n-grams has its own vector representation, and the final word vector is the sum of these subword vectors and the vector of the word itself.