Downloads · 30 days
2
13% of all-time downloads
hezarai/word2vec-cbow-fa-conll17
word2vec-cbow-fa-conll17 is a feature extraction model from hezarai. Use it when you need embeddings to search or compare text. It is set up for hezar.
This is the Persian word2vec embedding model trained with CBOW algorithm on the CoNLL17 dataset.
Downloads · 30 days
2
13% of all-time downloads
All-time downloads
15
Public
Repo size
418 MB
Likes
0
Public
Click a slice to open those files.
.npy387 MB · 92%
From the Hugging Face model README
This is the Persian word2vec embedding model trained with CBOW algorithm on the CoNLL17 dataset.
In order to use this model in Hezar you can simply use this piece of code:
pip install hezar
from hezar.embeddings import Embedding
w2v = Embedding.load("hezarai/word2vec-cbow-fa-conll17")
# Get embedding vector
vector = w2v("هزار")
# Find the word that doesn't match with the rest
doesnt_match = w2v.doesnt_match(["خانه", "اتاق", "ماشین"])
# Find the top-n most similar words to the given word
most_similar = w2v.most_similar("هزار", top_n=5)
# Find the cosine similarity value between two words
similarity = w2v.similarity("مهندس", "دکتر")