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

使用自定义停用词库后报错 #204

Open
tushunlin opened this issue Dec 15, 2021 · 1 comment
Open

使用自定义停用词库后报错 #204

tushunlin opened this issue Dec 15, 2021 · 1 comment

Comments

@tushunlin
Copy link

tushunlin commented Dec 15, 2021

经过停用词过滤之后。再次调用别的发现器
比如:
Result modifResult = DicAnalysis.parse(str,DicLibrary.gets(Dictionary.userDic,DicLibrary.DEFAULT)).recognition(Dictionary.getStopFilter()).recognition(new EmailRecognition());
System.out.println(modifResult);

报错如下:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 37
at org.ansj.util.Graph.getMaxTerm(Graph.java:174)
at org.ansj.util.Graph.rmLittlePath(Graph.java:144)
at org.ansj.app.extracting.Extracting.parse(Extracting.java:130)
at org.ansj.app.extracting.Extracting.parse(Extracting.java:113)
at org.ansj.recognition.impl.EmailRecognition.recognition(EmailRecognition.java:38)
at org.ansj.domain.Result.recognition(Result.java:53)
at varyag.WordEngine.ansj_analysis(WordEngine.java:54)
at varyag.WordEngine.main(WordEngine.java:48)

@shi-yuan
Copy link
Member

str、词典内容,麻烦提供下

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