UppsalaNLP / uuparser

A transition-based parser for Universal Dependencies with BiLSTM word and character representations.
Apache License 2.0
80 stars 25 forks source link

Problem with --multiling flag #3

Closed andidyer closed 5 years ago

andidyer commented 5 years ago

I'm having an issue with the multiling option. My script looks like this:

python src/parser.py \ --outdir my_output \ --datadir Treebanks/ud-treebanks-v2.2 \ --include "ja ko" \ --multiling \ --pos-emb-size 100 --dynet-seed 123456789 \ --dynet-mem 10000

But when I include just the ISO code, it comes up with this error:

Traceback (most recent call last): File "src/parser.py", line 254, in run(experiment,options) File "src/parser.py", line 41, in run parser.Train(traindata,options) File "/cluster/home/andidyer/uuparser-master3/barchybrid/src/arc_hybrid.py", line 408, in Train print("Loss: ", mloss/iSentence) UnboundLocalError: local variable 'iSentence' referenced before assignment

It works okay if I include both the ISO and the treebank ID, e.g. "ja_gsd ko_gsd".

Am I using --multiling incorrectly?

Many thanks,

Andi

andidyer commented 5 years ago

Never mind, I've found the problem; I was looking at the wrong ISO file (the 2.2 needs underscores and treebank IDs).

Can close this, but maybe update it on the README since 2.2 is the default.

mdelhoneux commented 5 years ago

ha I only just saw this because you closed the issue :) But you are correct, I've thought before that the iso code part of the README is probably confusing since 2.2