sheng-z / stog

AMR Parsing as Sequence-to-Graph Transduction
MIT License
154 stars 36 forks source link

Error of preprocessing with CoreNLP #9

Open freesunshine0316 opened 4 years ago

freesunshine0316 commented 4 years ago

Hi Sheng,

Please see the attached log for more details.

(stog) lfsong@c47:tool.amr_parsing_stog$ ./scripts/annotate_features.sh data/AMR/amr_2.0
[2019-09-05 06:18:53,869 INFO] Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
[2019-09-05 06:18:53,885 INFO] Processing data/AMR/amr_2.0/test.txt
Traceback (most recent call last):
  File "/data/home/lfsong/anaconda3/envs/stog/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/data/home/lfsong/anaconda3/envs/stog/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/data2/lfsong/tool.amr_parsing_stog/stog/data/dataset_readers/amr_parsing/preprocess/feature_annotator.py", line 205, in <module>
    annotation = annotator(amr.sentence)
  File "/data2/lfsong/tool.amr_parsing_stog/stog/data/dataset_readers/amr_parsing/preprocess/feature_annotator.py", line 75, in __call__
    annotation = self.annotate(text)
  File "/data2/lfsong/tool.amr_parsing_stog/stog/data/dataset_readers/amr_parsing/preprocess/feature_annotator.py", line 63, in annotate
    tokens = self.nlp.annotate(text.strip(), self.nlp_properties)['sentences'][0]['tokens']
TypeError: string indices must be integers
verosol commented 3 years ago

Hi! Did you solve this problem? I have the same issue, unfortunately.

leoliner commented 2 years ago

Hi! Did you solve this problem? I have the same issue, unfortunately. QAQ

wangchunliu commented 1 year ago

Python version should be 3.6