Interface Analysis
-
- All Known Implementing Classes:
AnalysisImpl
public interface AnalysisA dedicated interface for Luke's Analysis tab.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAnalysis.TokenHolder for a token.static classAnalysis.TokenAttributeHolder for a token attribute.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddExternalJars(List<String> jarFiles)Adds external jar files to classpath and loads customCharFilterFactorys,TokenizerFactorys, orTokenFilterFactorys.List<Analysis.Token>analyze(String text)Analyzes given text with the current Analyzer.AnalyzerbuildCustomAnalyzer(CustomAnalyzerConfig config)Creates new custom Analyzer instance with the given configurations.AnalyzercreateAnalyzerFromClassName(String analyzerType)Creates new Analyzer instance for the specified class name.AnalyzercurrentAnalyzer()Returns current analyzer.Collection<String>getAvailableCharFilters()Returns available char filter names.Collection<String>getAvailableTokenFilters()Returns available token filter names.Collection<String>getAvailableTokenizers()Returns available tokenizer names.Collection<Class<? extends Analyzer>>getPresetAnalyzerTypes()Returns built-inAnalyzers.
-
-
-
Method Detail
-
getPresetAnalyzerTypes
Collection<Class<? extends Analyzer>> getPresetAnalyzerTypes()
Returns built-inAnalyzers.
-
getAvailableCharFilters
Collection<String> getAvailableCharFilters()
Returns available char filter names.
-
getAvailableTokenizers
Collection<String> getAvailableTokenizers()
Returns available tokenizer names.
-
getAvailableTokenFilters
Collection<String> getAvailableTokenFilters()
Returns available token filter names.
-
createAnalyzerFromClassName
Analyzer createAnalyzerFromClassName(String analyzerType)
Creates new Analyzer instance for the specified class name.- Parameters:
analyzerType- - instantiable class name of an Analyzer- Returns:
- new Analyzer instance
- Throws:
LukeException- - if failed to create new Analyzer instance
-
buildCustomAnalyzer
Analyzer buildCustomAnalyzer(CustomAnalyzerConfig config)
Creates new custom Analyzer instance with the given configurations.- Parameters:
config- - custom analyzer configurations- Returns:
- new Analyzer instance
- Throws:
LukeException- - if failed to create new Analyzer instance
-
analyze
List<Analysis.Token> analyze(String text)
Analyzes given text with the current Analyzer.- Parameters:
text- - text string to analyze- Returns:
- the list of token
- Throws:
LukeException- - if an internal error occurs when analyzing text
-
currentAnalyzer
Analyzer currentAnalyzer()
Returns current analyzer.- Throws:
LukeException- - if current analyzer not set
-
addExternalJars
void addExternalJars(List<String> jarFiles)
Adds external jar files to classpath and loads customCharFilterFactorys,TokenizerFactorys, orTokenFilterFactorys.- Parameters:
jarFiles- - list of paths to jar file- Throws:
LukeException- - if an internal error occurs when loading jars
-
-