Search in sources :

Example 1 with TurkishDeASCIIfyFilter

use of org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter in project lucene-solr-analysis-turkish by iorixxx.

the class TestTurkishDeASCIIfyFilter method testDeAscii.

public void testDeAscii() throws Exception {
    TokenStream stream = whitespaceMockTokenizer("kus fadil akgunduz dogalgaz ahmet");
    stream = new TurkishDeASCIIfyFilter(stream, false);
    assertTokenStreamContents(stream, new String[] { "kuş", "fadıl", "akgündüz", "doğalgaz", "ahmet" });
}
Also used : TokenStream(org.apache.lucene.analysis.TokenStream) TurkishDeASCIIfyFilter(org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter)

Example 2 with TurkishDeASCIIfyFilter

use of org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter in project lucene-solr-analysis-turkish by iorixxx.

the class TestTurkishDeASCIIfyFilter method testDeAscii2.

public void testDeAscii2() throws Exception {
    TokenStream stream = whitespaceMockTokenizer("tatlises akgunduz sakip cernobil baslattigi dayanikliklarini");
    stream = new TurkishDeASCIIfyFilter(stream, false);
    assertTokenStreamContents(stream, new String[] { "tatlıses", "akgündüz", "sakıp", "çernobil", "başlattığı", "dayanıklıklarını" });
}
Also used : TokenStream(org.apache.lucene.analysis.TokenStream) TurkishDeASCIIfyFilter(org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter)

Example 3 with TurkishDeASCIIfyFilter

use of org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter in project lucene-solr-analysis-turkish by iorixxx.

the class TestTurkishDeASCIIfyFilter method testPreserveOriginal.

public void testPreserveOriginal() throws Exception {
    TokenStream stream = whitespaceMockTokenizer("kus fadil akgunduz dogalgaz ahmet izmir");
    stream = new TurkishDeASCIIfyFilter(stream, true);
    assertTokenStreamContents(stream, new String[] { "kuş", "kus", "fadıl", "fadil", "akgündüz", "akgunduz", "doğalgaz", "dogalgaz", "ahmet", "izmir" });
}
Also used : TokenStream(org.apache.lucene.analysis.TokenStream) TurkishDeASCIIfyFilter(org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter)

Aggregations

TokenStream (org.apache.lucene.analysis.TokenStream)3 TurkishDeASCIIfyFilter (org.apache.lucene.analysis.tr.TurkishDeASCIIfyFilter)3