problem with evaluation command

9 views
Skip to first unread message

Rebecca Anagnostopoulou

unread,
Dec 1, 2018, 4:33:25 AM12/1/18
to mwetoolkit

Hi,


I have run the following commands, but I get an error in the last one:

Command for training: mwetoolkit/bin/train_crf.py mwetoolkit/EL/train.cupt

Command for applying the tagger to the trial blind test file: mwetoolkit/bin/annotate_crf.py mwetoolkit/EL/test.blind.cupt > mwetoolkit/EL/output_crf.cupt

Command for evaluation: python mwetoolkit/bin/evaluate.py --pred mwetoolkit/EL/output_crf.cupt --gold mwetoolkit/EL/test.cupt --train mwetoolkit/EL/train.cupt

 

The problem is that when I am running the last command I am getting the following error:

Traceback (most recent call last):

  File "mwetoolkit/bin/evaluate.py", line 8, in <module>

    import tsvlib

ImportError: No module named 'tsvlib'

 

However, I have downloaded the TSV-to-FoLiA tool from here: https://github.com/proycon/parseme-support , but the error still says that the tsvlibrary is not there. This happens when I put this "parseme-support" file outside the bin.

 

I also tried to put the tsvlib.py and the tsvtofolia.py alongside the evaluation script, and the error is the following:

 

===> ERROR when reading mwetoolkit/EL/train.cupt (line 135803)

Traceback (most recent call last):

  File "mwetoolkit/bin/evaluate.py", line 491, in <module>

    Main(parser.parse_args()).run()

  File "mwetoolkit/bin/evaluate.py", line 67, in run

    seen = SeenInfo(self.args.train_file)

  File "mwetoolkit/bin/evaluate.py", line 277, in __init__

    self.mwe_fieldindex_sets[field_name] = self._calc_mwe_fieldindex_sets(field_name, sents)

  File "mwetoolkit/bin/evaluate.py", line 288, in _calc_mwe_fieldindex_sets

    return set(fieldindex_set for sentence in sents for fieldindex_set

  File "mwetoolkit/bin/evaluate.py", line 289, in <genexpr>

    in sentence.iter_mwe_fields_and_normalizedindexes(field_name))

AttributeError: 'TSVSentence' object has no attribute 'iter_mwe_fields_and_normalizedindexes'


Could you please help me figure out what is going wrong?


Thanks in advance,

Rebecca Anagnostopoulou

IMG_20181201_102323.jpg
Reply all
Reply to author
Forward
0 new messages