Closed erwinyusrizal closed 7 years ago
This is the code that was used to train the word embeddings. These embeddings are the features used in polyglot. Nowadays, you should use word2vec to learn word embeddings.
@aboSamoor sorry I have to reopen this, I have an error when trying to train a model using polyglot2
Traceback (most recent call last):
File "../env/bin/polyglot2-trainer.py", line 89, in <module>
main(args)
File "../env/bin/polyglot2-trainer.py", line 61, in main
min_count=args.min_count, workers=args.workers)
File "../env/local/lib/python2.7/site-packages/polyglot2/polyglot2.py", line 98, in __init__
self.build_vocab(sentences)
File "../env/local/lib/python2.7/site-packages/polyglot2/polyglot2.py", line 147, in build_vocab
self.reset_weights()
File "../env/local/lib/python2.7/site-packages/polyglot2/polyglot2.py", line 258, in reset_weights
self.W1 += self.random_values(self.W1.shape)
TypeError: ufunc 'add' output (typecode 'O') could not be coerced to provided output parameter (typecode 'd') according to the casting rule ''same_kind''
any idea why?
thanks
OK I got it working now...
@erwinyusrizal Hi! I'm getting the same error, Any idea how to fix it? :)
Hi @aboSamoor I see you have Polyglot2 here http://polyglot2.readthedocs.io/en/latest/
Whats the different? is it the new version of this polyglot?
Thanks