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

TypeError: word_tokenize() takes 2 positional arguments but 3 were given #14

Open
iiiiikkkkk opened this issue Nov 6, 2022 · 2 comments

Comments

@iiiiikkkkk
Copy link

iiiiikkkkk commented Nov 6, 2022

The issue happens in utils.py line 183
I check the source code of corenlp, the function of word_tokenize() only has two arguments that are self and sent, i don't know where the boolean argument come from.
If possible, could you please help me to solve this problem? Or provide the processed ACE data?
Thanks a lot!

@wzq016
Copy link
Collaborator

wzq016 commented Nov 6, 2022

Hi, could you provide more information? For example, the version of corenlp, the error log, etc.

@iiiiikkkkk
Copy link
Author

Hi, thanks for your reply.
I found the problem!
My corenlp version is 3.7.0.2, when i upgrade its version, it works.

However, another problem has happened, the log is:

Traceback (most recent call last):
File "train.py", line 26, in
tf.app.run()
File "/home/.conda/envs/ace/lib/python3.8/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/.conda/envs/ace/lib/python3.8/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/.conda/envs/ace/lib/python3.8/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "train.py", line 15, in main
extractor.Extract()
File "/home/HMEAE-master/utils.py", line 386, in Extract
self.Event_Extract()
File "/home/HMEAE-master/utils.py", line 198, in Event_Extract
idx_start,idx_end = self.find_index(find_offsets,(e['start'],e['end']))
File "/home/HMEAE-master/utils.py", line 43, in find_index
assert idx_start!=-1 and idx_end!=-1
AssertionError

Could you please help me to solve this problem?
Thank you very much!

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