You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
测试代码:
public class TestHanLP { @test
public void test1(){
StandardTokenizer.SEGMENT.enableNumberQuantifierRecognize(true);
IndexTokenizer.SEGMENT.enableNumberQuantifierRecognize(true);
List termList = StandardTokenizer.segment("此帐号有欠费业务是什么");
termList = IndexTokenizer.segment("此帐号有欠费业务是什么");
termList = StandardTokenizer.segment("15307971214话费还有多少");
termList = IndexTokenizer.segment("15307971214话费还有多少");
System.out.println(termList);
}
}
在对"此帐号有欠费业务是什么"分词时很正常.
对""15307971214话费还有多少"分词时发生数组越界异常错误.
异常错误:
java.lang.ArrayIndexOutOfBoundsException: 19
at com.hankcs.hanlp.seg.common.WordNet.get(WordNet.java:214)
at com.hankcs.hanlp.seg.WordBasedGenerativeModelSegment.decorateResultForIndexMode(WordBasedGenerativeModelSegment.java:489)
at com.hankcs.hanlp.seg.Viterbi.ViterbiSegment.segSentence(ViterbiSegment.java:105)
at com.hankcs.hanlp.seg.Segment.seg(Segment.java:291)
at com.hankcs.hanlp.tokenizer.IndexTokenizer.segment(IndexTokenizer.java:33)
at com.xin.file.FileTest.test4(FileTest.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
The text was updated successfully, but these errors were encountered:
测试代码:
public class TestHanLP {
@test
public void test1(){
StandardTokenizer.SEGMENT.enableNumberQuantifierRecognize(true);
IndexTokenizer.SEGMENT.enableNumberQuantifierRecognize(true);
List termList = StandardTokenizer.segment("此帐号有欠费业务是什么");
termList = IndexTokenizer.segment("此帐号有欠费业务是什么");
termList = StandardTokenizer.segment("15307971214话费还有多少");
termList = IndexTokenizer.segment("15307971214话费还有多少");
System.out.println(termList);
}
}
在对"此帐号有欠费业务是什么"分词时很正常.
对""15307971214话费还有多少"分词时发生数组越界异常错误.
异常错误:
java.lang.ArrayIndexOutOfBoundsException: 19
at com.hankcs.hanlp.seg.common.WordNet.get(WordNet.java:214)
at com.hankcs.hanlp.seg.WordBasedGenerativeModelSegment.decorateResultForIndexMode(WordBasedGenerativeModelSegment.java:489)
at com.hankcs.hanlp.seg.Viterbi.ViterbiSegment.segSentence(ViterbiSegment.java:105)
at com.hankcs.hanlp.seg.Segment.seg(Segment.java:291)
at com.hankcs.hanlp.tokenizer.IndexTokenizer.segment(IndexTokenizer.java:33)
at com.xin.file.FileTest.test4(FileTest.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
The text was updated successfully, but these errors were encountered: