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

照応解析(anaphora)オプションを付けると前の入力を読み続ける #11

Open
Ina299 opened this issue Oct 4, 2021 · 1 comment

Comments

@Ina299
Copy link

Ina299 commented Oct 4, 2021

anaphoraオプションを付けると複数文の結果を見ようとするのか前の入力内容をflushしないで延々と関係を見に行くケースがある
そのため同じ単語を多く含む文章郡を何度か投入するとEntity "%s" mentiond too many times!が発生する

from pyknp import KNP    
import traceback    
knp = KNP(option='-tab -anaphora')     # Default is JUMAN++. If you use JUMAN, use KNP(jumanpp=False)    
ll = ["硫酸を流す","硫酸から流す","硫酸から飛び降りる"]    
for i in range(0,100):  
    for j in ll:  
        try:  
            result = knp.parse(j)  
        except:  
            print(traceback.format_exc())  
            pass  

Entity "硫酸" mentiond too many times!
JUMAN++ 1.01
knp 4.19
pyknp 0.6
ku-nlp/pyknp#55

@nobu-g
Copy link
Member

nobu-g commented Oct 4, 2021

Moved from ku-nlp/pyknp#55

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