maciejkula / glove-python

Toy Python implementation of http://www-nlp.stanford.edu/projects/glove/
Apache License 2.0
1.25k stars 319 forks source link

Missing import in example analogy_tasks_evaluation.py #116

Open DoDzilla-ai opened 3 years ago

DoDzilla-ai commented 3 years ago

There is a missing import statement for the unicode library which is used at the 37th row between these lines:

    if args.encode:
        encode = lambda words: [x.lower().encode('utf-8') for x in words]
    else:
        encode = lambda words: [unicode(x.lower()) for x in words]

From what I understand, for Python 3 unicode should be replaced with str.