adding test for lucene analayzer
fixed problem with string checking git-svn-id: https://russianmorphology.googlecode.com/svn/trunk@62 d817d54c-26ab-11de-abc9-2f7d1455ff7a
This commit is contained in:
@ -75,4 +75,8 @@ public class LuceneMorph extends Morph {
|
||||
}
|
||||
return result.toArray(new Heuristic[result.size()]);
|
||||
}
|
||||
|
||||
public boolean checkString(String s) {
|
||||
return decoderEncoder.checkString(s);
|
||||
}
|
||||
}
|
||||
|
@ -53,9 +53,7 @@ public class MorphlogyFilter extends TokenFilter {
|
||||
|
||||
Token nextToken = input.next(reusableToken);
|
||||
if (nextToken == null) return null; // EOS; iterator exhausted
|
||||
Character testC = nextToken.term().charAt(0);
|
||||
//todo check here for decoder endocoder
|
||||
if (Character.UnicodeBlock.of(testC) != Character.UnicodeBlock.CYRILLIC) {
|
||||
if (!luceneMorph.checkString(nextToken.term())) {
|
||||
return nextToken;
|
||||
}
|
||||
stack = luceneMorph.getMorhInfo(nextToken.term());
|
||||
|
Reference in New Issue
Block a user