Summary
In this chapter, we covered embeddings in Flair. They are the core concept behind all NLP tasks. We learned about how embeddings behave, their role, and how to use them in Flair through hands-on practical exercises.
We implemented an NLP analogy solver that can predict the last word in an analogy using arithmetic operations and relationships between word embeddings. By doing this, we not only refreshed our memory on how to use Flair's base types in practice, but we also illustrated what word embeddings are and how to derive meaning from them. We then also covered all the embedding types in Flair. We first covered classic word embeddings, followed by Flair embeddings. Using a meta embedding method, we used stacked embeddings and combined multiple embeddings into a new embedding – a technique used for achieving state-of-the-art results in Flair. We then gained hands-on experience of how to form document embeddings in Flair and concluded the chapter with a list...