gabrielStanovsky / unified-factuality

Code, data and models for the paper "Integrating Deep Linguistic Features in Factuality Prediction over Unified Datasets" (Stanovsky, Eckle-Kohler, Puzikov, Dagan and Gurevych ACL 2017)
MIT License
7 stars 0 forks source link

TypeError when converting MEANTIME #1

Closed ypuzikov closed 7 years ago

ypuzikov commented 7 years ago

I get a TypeError when converting the following MEANTIME document: /data/external_annotations/meantime//meantime_newsreader_english_oct15/intra_cross-doc_annotation/corpus_apple/89284_Apple_to_lower_UK_iTunes_prices.xml

Traceback: File "./convert_meantime_to_conll.py", line 43, in mt = Meantime(fn, translate_dic) File "/home/puzikov@ukp.informatik.tu-darmstadt.de/tmp/unified-factuality/src/readers.py", line 282, in init self.convert(self.fn) File "/home/puzikov@ukp.informatik.tu-darmstadt.de/tmp/unified-factuality/src/readers.py", line 428, in convert dep_feats = self.get_dep_feats(toks, sent) File "/home/puzikov@ukp.informatik.tu-darmstadt.de/tmp/unified-factuality/src/readers.py", line 441, in get_dep_feats self.align(toks, sent) File "/home/puzikov@ukp.informatik.tu-darmstadt.de/tmp/unified-factuality/src/readers.py", line 470, in align toks[toks_ind : toks_ind + 2].merge() File "spacy/tokens/span.pyx", line 80, in spacy.tokens.span.Span.merge (spacy/tokens/span.cpp:4503) TypeError: merge() takes exactly 3 positional arguments (0 given)

ypuzikov commented 7 years ago

Just noticed that the path to the file contains double slash "//":

/data/external_annotations/meantime//meantime_newsreader_english_oct15/intra_cross-doc_annotation/corpus_apple/89284_Apple_to_lower_UK_iTunes_prices.xml

This is not intended, isn't it?

judithek commented 7 years ago

testing on Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2

I get an import error when running convert_corpora.sh:

./scripts/convert_corpora.sh Converting UW.. Traceback (most recent call last): File "convert_uw_to_conll.py", line 6, in from docopt import docopt ImportError: No module named docopt

gabrielStanovsky commented 7 years ago

@judithek Opened a new dedicated issue (see #5)

gabrielStanovsky commented 7 years ago

This doesn't happen on my machine @judithek, do you get this error?

@ypuzikov, what spacy version do you have installed? maybe this is related to what you had with #3 ?

ypuzikov commented 7 years ago

@gabrielStanovsky , you are right! This problem also went away after resolving issue #3 . However, I get another error, this time when converting Factbank:

Converting FactBank.. DEBUG:root:Parsing Factbank Traceback (most recent call last): File "./readers.py", line 628, in os.path.join(inp_, "tokens_tml.txt")) File "./readers.py", line 135, in init self.conll_txt = self.convert(tokens_tml) File "./readers.py", line 206, in convert if (tmlTag == 'EVENT')\ File "./readers.py", line 186, in consolidate_fact_value else self.to_float(list(opts.values()[0])[0]) File "./readers.py", line 164, in to_float return self.conversion_dic[fact_val] KeyError: 'NA'

gabrielStanovsky commented 7 years ago

If the original issue is solved, can you please close this, and open a new one with the new problem? Thanks!

ypuzikov commented 7 years ago

The original problem is solved. Closing the issue.