aboSamoor / polyglot

Multilingual text (NLP) processing toolkit
http://polyglot-nlp.com
Other
2.31k stars 337 forks source link

Polyglot 2 #116

Closed erwinyusrizal closed 7 years ago

erwinyusrizal commented 7 years ago

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

aboSamoor commented 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.

erwinyusrizal commented 7 years ago

@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

erwinyusrizal commented 7 years ago

OK I got it working now...

Sina-KH commented 6 years ago

@erwinyusrizal Hi! I'm getting the same error, Any idea how to fix it? :)