Examples of KoreanAnalyzer


Examples of com.tistory.devyongsik.analyzer.KoreanAnalyzer

    Highlighter highlighter = new Highlighter(scorer);

    Fragmenter fragmenter = new SimpleFragmenter(5);
    highlighter.setTextFragmenter(fragmenter);

    Analyzer a = new KoreanAnalyzer(false);
    TokenStream tokenStream = a.tokenStream("f", new StringReader(text));

    String result =
            highlighter.getBestFragments(tokenStream, text,2, "...");

    a.close();
   
    System.out.println(result);
   
    Assert.assertEquals(" <B>fox</B>... <B>fox</B>", result);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.