HMEAE icon indicating copy to clipboard operation
HMEAE copied to clipboard

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

Open iiiiikkkkk opened this issue 3 years ago • 2 comments

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!

iiiiikkkkk avatar Nov 06 '22 13:11 iiiiikkkkk

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

wzq016 avatar Nov 06 '22 19:11 wzq016

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!

iiiiikkkkk avatar Nov 07 '22 02:11 iiiiikkkkk