sebastian-hofstaetter / neural-ir-explorer

Neural-IR-Explorer: A Content-Focused Tool to Explore Neural Re-Ranking Results
https://neural-ir-explorer.ec.tuwien.ac.at/
Apache License 2.0
33 stars 3 forks source link

bling_fire_tokenizer.py: imports fail for Token #1

Open Genlight opened 3 years ago

Genlight commented 3 years ago

Import for the script bling_fire_tokenizer.py fails for the Token object with Python v. 3.9 and 3.8.

Problem lies with the changed allennlp import for the Token object,

Problem is fixed by adding:

from allennlp.data.tokenizers.token_class import Token
from blingfire import text_to_words

s. also image for diff.

BR

grafik

agrawalanshul053 commented 2 years ago

use pip install allennlp==0.9.0