We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9495315 commit 9873489Copy full SHA for 9873489
src/main/java/org/wltea/analyzer/core/AnalyzeContext.java
@@ -267,6 +267,15 @@ void outputToResult(){
267
Lexeme l = path.pollFirst();
268
while(l != null){
269
this.results.add(l);
270
+ //字典中无单字,但是词元冲突了,切分出相交词元的前一个词元中的单字
271
+ int innerIndex = index + 1;
272
+ for (; innerIndex < index + l.getLength(); innerIndex++) {
273
+ Lexeme innerL = path.peekFirst();
274
+ if (innerL != null && innerIndex == innerL.getBegin()) {
275
+ this.outputSingleCJK(innerIndex - 1);
276
+ }
277
278
+
279
//将index移至lexeme后
280
index = l.getBegin() + l.getLength();
281
l = path.pollFirst();
0 commit comments