@Override public TokenStream create(TokenStream tokenStream) { if (lang == null) { return new LowerCaseFilter(tokenStream); } else if (lang.equalsIgnoreCase("greek")) { return new GreekLowerCaseFilter(tokenStream); } else if (lang.equalsIgnoreCase("irish")) { return new IrishLowerCaseFilter(tokenStream); } else if (lang.equalsIgnoreCase("turkish")) { return new TurkishLowerCaseFilter(tokenStream); } else { throw new IllegalArgumentException("language [" + lang + "] not support for lower case"); } }
public void testStemming() throws Exception { Reader reader = new StringReader("άνθρωπος"); Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false); TokenStream normalized = new GreekLowerCaseFilter(TEST_VERSION_CURRENT, tokenizer); GreekStemFilterFactory factory = new GreekStemFilterFactory(); TokenStream stream = factory.create(normalized); assertTokenStreamContents(stream, new String[] { "ανθρωπ" }); }
@Override public GreekLowerCaseFilter create(TokenStream in) { return new GreekLowerCaseFilter(in); }
@Override public GreekLowerCaseFilter create(TokenStream in) { return new GreekLowerCaseFilter(luceneMatchVersion, in); }