Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error of preprocessing with CoreNLP #9

Open
freesunshine0316 opened this issue Sep 4, 2019 · 3 comments
Open

Error of preprocessing with CoreNLP #9

freesunshine0316 opened this issue Sep 4, 2019 · 3 comments

Comments

@freesunshine0316
Copy link

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
Copy link

verosol commented Dec 3, 2020

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

@leoliner
Copy link

leoliner commented Aug 5, 2021

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

@wangchunliu
Copy link

Python version should be 3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants