Table of contents
No headings in the article.
๐งฉ What's word embedding?
Do you wonder how #ArtificialIntelligence algorithms process text?
Word embeddings take words and turn them into vectors.
It helps computers understand words like humans do!
๐ Embeddings
Embedding has the property:
- similar words are closer
- different words are farther apart.
So, "king" and "man" are close, just like "queen" and "woman".
This space is called the "embedding/latent space".
A universe of words in number form.
๐ง Algorithms
Algorithms like Word2Vec, GloVe, and FastText are training with a LOTS of text.
They learn the number patterns for each word.
These patterns show word relationships like friendships, opposites, and more!
๐ ๏ธ Why?
Word embeddings help:
- in understanding if a movie review is happy or sad
- finding information quickly, etc.
๐ How does embedding work?
Input: a sequence of integers. Used as the index to access a table that contains all possible vectors.
Let's suppose that you have the following sentence: "Nice to see you again".
First, we need to encode the sentence into a list of integer.
Assign each word a unique integer number.
For example, by order of appearance in our dataset.
Then, let's train a network whose first layer is an embedding layer for a particular task.
Once trained, the embedding layer is a matrix of shape (7, 2) as shown below.
This is a map of integers to embedding vectors.
So, the list of integers above is represented using the embedding as:
๐ Conclusion
Word embeddings are like a secret language of numbers for words.
They help computers understand and play around with language just like a human.
Trained by reading and learning from tons of texts.
And guess what?
They're everywhere in tech today!
Let's just mention #ChatGPT #Claude #GPT4
#MachineLearning #deeplearning #NeuralNetworks
PS: If you like this, share this post โป๏ธ