-
Notifications
You must be signed in to change notification settings - Fork 497
How can I get the words embeddings? #17
Comments
Hi! Yes, I would suggest looking at the code in the notebook: Then doing something like that should work: word_id = dico.index('cat')
model.embeddings.weight[word_id] |
Thank you! How can I differentiate words from different languages (ie 'chat' in french means cat)? |
You can just replace "cat" by "chat" in the code above. There is only one share vocabulary, that contains the words for all languages. The vocabulary doesn't keep track of which word is used in which language. |
Got it, thx for everything! |
i want get models for russian language, the |
Yes, it contains Russian. But these two models will give you a better performance, and also support Russian: https://dl.fbaipublicfiles.com/XLM/mlm_17_1280.pth |
so, when i run
sorry, but your notebook have many errors at path to another users |
also, what does it mean? |
plus, at folder |
solved errors and create new pr describing the steps |
Hello!
Thank you for sharing this code!
Is there an easy way to get the embedding of a particular word?
Those found in table 5. of the paper.
Thank you!
The text was updated successfully, but these errors were encountered: