tagoyal / sow-reap-paraphrasing

Contains data/code for the paper "Neural Syntactic Preordering for Controlled Paraphrase Generation" (ACL 2020).
77 stars 9 forks source link

IndexError when running generate_paraphrases_sow_reap.py #5

Closed atreyasha closed 4 years ago

atreyasha commented 4 years ago

I got the following error when running the command below.

$ python3 generate_paraphrases_sow_reap.py --device_ids 0 --glove_file ../spam_detection/src/data/glove/glove.6B.50d.txt

-1
-1
0
some of them indicated that they might consider removing the product from their product range if anti-dumping duties were imposed .

2
wild , right ? - you need his permission to breathe .

4
oh , after my miscarriage , i gave up on this dream . i just figured god decided

6
and if his behavior is making you mad , he learned it from you .

8
that 's very kind , but we can make our own way .

10
i left you four messages . you okay ?

12
the minimum sizes for short-necked clam should be revised in the light of biological data .

14
well , take your shortcut , and i 'll take the long way . but you 'd better be there - before i arrive .

16
back then , liet had been terrified , but he had completed the ordeal .

18
and then will come the powers of the malazan empire .

20                       
3.1.3 labour market policy measures to accompany economic revival are key .

22
maine was very short on black people back then .

Traceback (most recent call last):
  File "generate_paraphrases_sow_reap.py", line 284, in <module>
    main(args)
  File "generate_paraphrases_sow_reap.py", line 135, in main
    output_sent = sentences[idx + 1]
IndexError: list index out of range
tagoyal commented 4 years ago

oh, that's just because i accidentally put odd number of sents in the sample file. Check updated.

tagoyal commented 4 years ago

the sample test file for sow reap should contain the parse of both the input, and the gold paraphrase. IT requires the gold paraphrase to calculate nll.

if your data does not have gold paraphrases, put in a random string, and ignore the relevant fields in the generated text.

atreyasha commented 4 years ago

the sample test file for sow reap should contain the parse of both the input, and the gold paraphrase. IT requires the gold paraphrase to calculate nll.

if your data does not have gold paraphrases, put in a random string, and ignore the relevant fields in the generated text.

Thank you :) Yes, I just tested so far on the sample data you provided. Will test it soon on our own data.