Skip to content

Commit

Permalink
Merge branch 'pr/621'
Browse files Browse the repository at this point in the history
  • Loading branch information
medcl committed Mar 25, 2019
2 parents f0dd522 + 9873489 commit 125ac3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/wltea/analyzer/core/AnalyzeContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ void outputToResult(){
Lexeme l = path.pollFirst();
while(l != null){
this.results.add(l);
//字典中无单字,但是词元冲突了,切分出相交词元的前一个词元中的单字
int innerIndex = index + 1;
for (; innerIndex < index + l.getLength(); innerIndex++) {
Lexeme innerL = path.peekFirst();
if (innerL != null && innerIndex == innerL.getBegin()) {
this.outputSingleCJK(innerIndex - 1);
}
}

//将index移至lexeme后
index = l.getBegin() + l.getLength();
l = path.pollFirst();
Expand Down

0 comments on commit 125ac3c

Please sign in to comment.