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

asking #10

Open
ArcherZJ opened this issue Aug 30, 2019 · 6 comments
Open

asking #10

ArcherZJ opened this issue Aug 30, 2019 · 6 comments

Comments

@ArcherZJ
Copy link

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

@lemonhu
Copy link
Owner

lemonhu commented Aug 31, 2019

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.

@Max1110
Copy link

Max1110 commented Dec 18, 2019

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?

@lemonhu
Copy link
Owner

lemonhu commented Dec 22, 2019

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

@novolandjia-z
Copy link

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?

@dxz6160
Copy link

dxz6160 commented Jul 18, 2020

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

@tamarde97
Copy link

|-- 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 应该没错吧。作者有什么建议吗,我被这个折磨了好久 @_@#。谢谢。

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

6 participants