Class WAAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.silverpeas.core.index.indexing.model.WAAnalyzer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class WAAnalyzer extends org.apache.lucene.analysis.Analyzer
Extends lucene Analyzer : prunes from a tokens stream all the meaningless words and prunes all the special characters.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents
createComponents(String s)
Returns a tokens stream built on top of the given reader.static org.apache.lucene.analysis.Analyzer
getAnalyzer(String language)
Returns the analyzer to be used with texts of the given language.String
getLanguage()
-
-
-
Method Detail
-
getAnalyzer
public static org.apache.lucene.analysis.Analyzer getAnalyzer(String language)
Returns the analyzer to be used with texts of the given language. The analyzers are cached.- Parameters:
language
- the ISO 631-1 code of the language- Returns:
- an analyser of a text written in the given language.
-
createComponents
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String s)
Returns a tokens stream built on top of the given reader.- Specified by:
createComponents
in classorg.apache.lucene.analysis.Analyzer
-
getLanguage
public String getLanguage()
-
-