open-entity-relation-extraction icon indicating copy to clipboard operation
open-entity-relation-extraction copied to clipboard

asking

Open ArcherZJ opened this issue 6 years ago • 6 comments

why i get it? can you tell me how to deal it or explain the reason. thankyou!

Building prefix dict from the default dictionary ... Loading model from cache C:\Users\gongh\AppData\Local\Temp\jieba.cache Loading model cost 0.678 seconds. Prefix dict has been built succesfully. Postagger: Model not loaded! Traceback (most recent call last): File "E:/GitHubResourse/open_entity_relation_extraction_master/code/demo/extract_demo.py", line 37, in words_postag = nlp.postag(lemmas) File "..\core\nlp.py", line 94, in postag word = WordUnit(i+1, lemmas[i], postags[i]) IndexError: Index out of range

ArcherZJ avatar Aug 30 '19 15:08 ArcherZJ

The problem is that the ltp models are not loaded and they can be downloaded from http://ltp.ai/download.html, select ltp_data_v3.4.0.zip.

lemonhu avatar Aug 31 '19 01:08 lemonhu

hello,i have already download ltp_data_v3.4.0.zip and put it on the folder model but it still show indexerror, that is why? Could you give me some advice?

Max1110 avatar Dec 18 '19 07:12 Max1110

@Max1110 Thank you for your attention. The question is too general. Can you post the code snippet with problem.

lemonhu avatar Dec 22 '19 12:12 lemonhu

Hello, I also encountered this problem. What is the specific placement method of the model under ../../model? Can you directly put it into the ltp_data_v3.4.0.zip downloaded? Do you need to download the ltp-win-x64-release-zip ? Could you please tell me how to place the file under ../../model?

novolandjia-z avatar May 02 '20 03:05 novolandjia-z

You only need to unzip ltp_data_v3.4.0.zip to the model

dxz6160 avatar Jul 18 '20 15:07 dxz6160

|-- code/
| |-- bean/ | |-- core/ | |-- demo/
| |-- tool/ |-- data/ | |-- input_text.txt
| |-- knowledge_triple.json |-- model/ # 我已下载解压,该文件夹内都是 xxx.model 文件 |-- resource |-- requirements.txt
|-- README.md

我已照上面的目录结构做了,但仍然运行失败,而且我注意到下载的东西内包含一个MD5.txt文件,意思是model被加密了是吗。其中 nlp.py 文件加载的词性标注模型路径,我打印出来是这样的 ../../model/pos.model 应该没错吧。作者有什么建议吗,我被这个折磨了好久 @_@#。谢谢。

tamarde97 avatar Aug 13 '22 03:08 tamarde97