dair-iitd / imojie

Neural generation model for Open Information Extraction
79 stars 17 forks source link

Standalone.py outputs only the last sentence #9

Open HermannKroll opened 3 years ago

HermannKroll commented 3 years ago

See fix (Pull request: #8)

taylormr commented 3 years ago

I am still getting this issue despite the fix. I have the current version of the repo

My output looks like this: last sentence (first; sentence; triple)

last sentence (second; sentence; triple)

last sentence (last; sentence; triple)

HermannKroll commented 3 years ago

I am not sure if this repository is maintained further. You may have a closer look at https://github.com/dair-iitd/openie6 OpenIE 6 seems to be the successor of IMoJIE. It is much faster and has a better extraction quality. See https://arxiv.org/abs/2010.03147

123zzw commented 3 years ago

Hello, I also encountered this problem,have you solved it?

taylormr commented 3 years ago

No, I just hardcoded it to print each sentence from the input.

mpetruc commented 1 year ago

same here. To fix it edit standalone.py and replace the for loop starting at line 40 with this: for index, output in enumerate(output_instances):
output = sanitize(output) output = process(output["predicted_tokens"][0]) out.write(sentences[index]) out.write('\n'.join(output)+'\n\n') out.close()

Unrelated to this particular problem: if you want to use GPU, replace the cuda_device number in line 28 from -1 with the GPU number you want o use (in my case, since i have only one, i use 0).

FizaGulzarHussain commented 1 year ago

Anyone can guide me to produce the results of generated extractions from a standalone file using IMOJIE evaluation?