Heidelberg-NLP / xsrl_mbert_aligner

X-SRL Dataset. Including the code for the SRL annotation projection tool and an out-of-the-box word alignment tool based on Multilingual BERT embeddings.
Apache License 2.0
15 stars 3 forks source link

Example Code causes Module does not exist error #1

Open IHMCBrodie opened 3 years ago

IHMCBrodie commented 3 years ago

First off, wanted to say great work on this! I am very interested in this work and I appreciate you laying out clear instructions on this repo.

When running one of the example snippets (seen below), it produces the following error:

python pre_process/text_to_CoNLL.py \
    --src_file trial_data/SentsOnly_ES.txt \
    --out_file trial_data/ES_template_trial.conll \
    --lang ES
Traceback (most recent call last):
  File "text_to_CoNLL.py", line 9, in <module>
    from pre_process.CoNLL_Annotations import CoNLLUP_Token_Template
ModuleNotFoundError: No module named 'pre_process'

I am trying to find a fix for it cause I know it's mostly about the nested module imports but I don't want to have to edit every file and mess with the file structure a bunch so I figured I would let you guys know.

Thanks in advance

IHMCBrodie commented 3 years ago

I went ahead and removed the "preprocess." from the front of the import statements and that seemed work