Skip to content

Commit d982c09

Browse files
committed
Big CharsDic refactor
1 parent 083925c commit d982c09

13 files changed

Lines changed: 970 additions & 676 deletions

File tree

analysis/src/java/com/github/oeuvres/alix/lucene/analysis/LemmaFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public boolean incrementToken() throws IOException
174174
}
175175

176176
// Surface known ?
177-
final int formId = lex.id(termAtt);
177+
final int formId = lex.ord(termAtt);
178178
if (formId < 0) return true;
179179

180180
// Lookup with pos

analysis/src/java/com/github/oeuvres/alix/lucene/analysis/MweFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private void emitMerged(final int matchPos, final int matchOrd)
183183

184184
final int len = lexicon.formLength(matchOrd);
185185
final char[] buf = termAtt.resizeBuffer(len);
186-
lexicon.formToChars(matchOrd, buf, 0);
186+
lexicon.copy(matchOrd, buf, 0);
187187
termAtt.setLength(len);
188188

189189
// Fix endOffset and type.

analysis/src/java/com/github/oeuvres/alix/lucene/analysis/SentenceStartLowerCaseFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public boolean incrementToken() throws IOException
132132

133133
// 6) Probe lowercase form in lexicon; if known, rewrite with canonical form.
134134
probe.copyFrom(termAtt).toLowerCase();
135-
final int formId = lex.id(probe);
135+
final int formId = lex.ord(probe);
136136
if (formId < 0) {
137137
return true;
138138
}

0 commit comments

Comments
 (0)