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

为什么在data_process报错AttributeError: module 'corenlp' has no attribute 'CoreNLPClient' #50

Open
miokiko opened this issue Dec 24, 2024 · 1 comment

Comments

@miokiko
Copy link

miokiko commented Dec 24, 2024

Traceback (most recent call last):
File "data_preprocess.py", line 131, in
schema_linking_producer(spider_dev, spider_train, spider_table, spider_db, spider_dir)
File "data_preprocess.py", line 52, in schema_linking_producer
linking_processor.add_item(item, schema, section, validation_info)
File "D:\text2sql\DAIL-SQL-main\utils\linking_process.py", line 143, in add_item
preprocessed = self.preprocess_item(item, schema, validation_info)
File "D:\text2sql\DAIL-SQL-main\utils\linking_process.py", line 150, in preprocess_item
question, question_for_copying = self._tokenize_for_copying(item['question_toks'], item['question'])
File "D:\text2sql\DAIL-SQL-main\utils\linking_process.py", line 195, in _tokenize_for_copying
return self.word_emb.tokenize_for_copying(unsplit)
File "D:\text2sql\DAIL-SQL-main\utils\pretrained_embeddings.py", line 64, in tokenize_for_copying
ann = corenlp.annotate(text, self.corenlp_annotators)
File "D:\text2sql\DAIL-SQL-main\utils\linking_utils\corenlp.py", line 67, in annotate
_singleton = CoreNLP()
File "D:\text2sql\DAIL-SQL-main\utils\linking_utils\corenlp.py", line 42, in init
self.client = corenlp.CoreNLPClient()
AttributeError: module 'corenlp' has no attribute 'CoreNLPClient'

@BeachWang
Copy link
Owner

这可能是corenlp的版本问题,请参考这个issue

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