Java 类org.apache.lucene.analysis.ar.ArabicStemmer 实例源码

项目:arabic-light-stemmer    文件:Main.java   
private static String lightStem(String string) {
    ArabicNormalizer arabicNorm = new ArabicNormalizer();
    char[] c = string.toCharArray();
    int len = c.length;
    len = arabicNorm.normalize(c, len);
    char[] normalizedWord = new char[len];
    System.arraycopy(c, 0, normalizedWord, 0, len);



    ArabicStemmer araLightStemmer = new ArabicStemmer();
    len = araLightStemmer.stem(normalizedWord, len);
    char[] lightWord = new char[len];
    System.arraycopy(normalizedWord, 0, lightWord, 0, len);


    StringBuilder sbuf = new StringBuilder();
    sbuf.append(lightWord);


    String result = sbuf.toString();
    return result;
}
项目:search    文件:LuceneCarrot2StemmerFactory.java   
private LuceneStemmerAdapter() {
  delegate = new org.apache.lucene.analysis.ar.ArabicStemmer();
  normalizer = new org.apache.lucene.analysis.ar.ArabicNormalizer();
}
项目:SONDY    文件:ArabicStemming.java   
public ArabicStemming() {
    this.arabicStemmer = new ArabicStemmer();
}
项目:NYBC    文件:LuceneCarrot2StemmerFactory.java   
private LuceneStemmerAdapter() {
  delegate = new org.apache.lucene.analysis.ar.ArabicStemmer();
  normalizer = new org.apache.lucene.analysis.ar.ArabicNormalizer();
}
项目:read-open-source-code    文件:LuceneCarrot2StemmerFactory.java   
private LuceneStemmerAdapter() {
  delegate = new org.apache.lucene.analysis.ar.ArabicStemmer();
  normalizer = new org.apache.lucene.analysis.ar.ArabicNormalizer();
}