TypeError: unorderable types: spacy.tokens.token.Token() < spacy.tokens.token.Token() for Python 3
bozyurt opened this issue · comments
python keras_parikh_entailment/ train model snli_train/snli_1.0_train.jsonl snli_dev/snli_1.0_dev.jsonl
results in
TypeError: unorderable types: spacy.tokens.token.Token() < spacy.tokens.token.Token() error
at words.sort() in "keras_parikh_entailment/spacy_hook.py", line 59, in get_word_ids.
Seems like missing __lt__()
method in spacy.tokens.token.Token class for Python 3 sorting support.
--
Traceback (most recent call last):
File "/home/bozyurt/anaconda3/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"main", mod_spec)
File "/home/bozyurt/anaconda3/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "keras_parikh_entailment/main.py", line 127, in
plac.call(main)
File "/home/bozyurt/anaconda3/lib/python3.5/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/home/bozyurt/anaconda3/lib/python3.5/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "keras_parikh_entailment/main.py", line 120, in main
train(model_dir, train_loc, dev_loc, shape, settings)
File "keras_parikh_entailment/main.py", line 30, in train
tree_truncate=settings['tree_truncate']))
File "keras_parikh_entailment/spacy_hook.py", line 59, in get_word_ids
words.sort()
TypeError: unorderable types: spacy.tokens.token.Token() < spacy.tokens.token.Token()
Your Environment
- Operating System:
Linux 4.4.0-47-generic #68-Ubuntu 16.04 - Python Version Used:
Python 3.5.2 |Anaconda 4.1.1 (64-bit) - spaCy Version Used:
- Environment Information:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.