Skip to content

Commit

Permalink
Using termAtt.copyBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
azagniotov committed Feb 22, 2024
1 parent 6598f87 commit 94a0a07
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ public boolean incrementToken() throws IOException {
}

clearAttributes();
this.termAtt.append(morpheme.surface());
// this.termAtt.append(morpheme.surface());
final String surface = morpheme.surface();
this.termAtt.copyBuffer(surface.toCharArray(), 0, surface.length());

final int baseOffset = morphemeIterator.getBaseOffset();
final int startOffset = correctOffset(baseOffset + morpheme.begin());
Expand Down

0 comments on commit 94a0a07

Please sign in to comment.