You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The class of "model" is custom defined class but not native gensim model class. You may simply use aug = naw.WordEmbsAug( model_type='word2vec', model_path= '/Thesis/Word Embeddings/BioWordVec_PubMed_MIMICIII_d200.vec.bin', action="insert")
or you can load embeddings into a custom class first and passing it to augmenter
import nlpaug.model.word_embs as nmw
model = nmw.Word2vec()
model.read('/Thesis/Word Embeddings/BioWordVec_PubMed_MIMICIII_d200.vec.bin' , max_num_vector=1000000)
aug = naw.WordEmbsAug( model_type='word2vec', model= model, action="insert")
Hi!
I'm getting this error when I tried to augment a text. I used a pre-trained embedding called BioWordVec, their github repo is here:
I loaded their vector using gensim
bwv = KeyedVectors.load_word2vec_format('/Thesis/Word Embeddings/BioWordVec_PubMed_MIMICIII_d200.vec.bin', binary=True, limit=1000000)
and used it in WordsEmbAug like this
aug = naw.WordEmbsAug( model_type='word2vec', model= bwv, action="insert")
and when I run
aug_text = aug.augment(text)
I get the error 'Word2VecKeyedVectors' object has no attribute 'get_vocab'
The text was updated successfully, but these errors were encountered: