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

Standalone.py outputs only the last sentence #9

Open
HermannKroll opened this issue Nov 13, 2020 · 6 comments
Open

Standalone.py outputs only the last sentence #9

HermannKroll opened this issue Nov 13, 2020 · 6 comments

Comments

@HermannKroll
Copy link

See fix (Pull request: #8)

@taylormr
Copy link

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

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

123zzw commented Sep 16, 2021

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

@taylormr
Copy link

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

@mpetruc
Copy link

mpetruc commented May 23, 2023

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

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

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

5 participants