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

Comment and instance have different length #12

Open
fuzihaofzh opened this issue Oct 5, 2017 · 1 comment
Open

Comment and instance have different length #12

fuzihaofzh opened this issue Oct 5, 2017 · 1 comment

Comments

@fuzihaofzh
Copy link

I use

python amr_parsing.py -m preprocess --amrfmt amr data/del.txt

and get the following result:

Traceback (most recent call last):
  File "amr_parsing.py", line 436, in <module>
    main()
  File "amr_parsing.py", line 169, in main
    instances = preprocess(amr_file,START_SNLP=True,INPUT_AMR=args.amrfmt, PRP_FORMAT=args.prpfmt)
  File "/home/me/workbench/amr/camr/preprocessing.py", line 372, in preprocess
    _write_tok_amr(tok_amr_filename,amr_file,instances)
  File "/home/me/workbench/amr/camr/preprocessing.py", line 124, in _write_tok_amr
    output_tok.write(comment_list[i])
IndexError: list index out of range

I found that the sentence "Has history given us too many lessons?, 530, 412, 64" was splited into two sentence and thus has different number with the comment.
Could you please tell me how to solve this issue?

@ypuzikov
Copy link

Stanford CoreNLP default.properties file contains properties for each of the annotators used.
Set the ssplit.eolonly=true property in ./stanfordnlp/default.properties file. This will force CoreNLP to split sentences at newlines only.

See here: https://stanfordnlp.github.io/CoreNLP/ssplit.html

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

2 participants