|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompassAnalyzerHelper
A set of Analyzer related helper methods. Aimed to help understand and simulate the analysis process. As well as helping build advance query building capabilities.
| Method Summary | |
|---|---|
CompassToken[] |
analyze(Reader textReader)
Analyzes the given text, returning a set of tokens. |
CompassToken[] |
analyze(String text)
Analyzes the given text, returning a set of tokens. |
CompassToken[] |
analyze(String propertyName,
Reader textReader)
Analyzes the given text, using (if needed) the anlayzer that is bound to the supplied property. |
CompassToken[] |
analyze(String propertyName,
String text)
Analyzes the given text, using (if needed) the anlayzer that is bound to the supplied property. |
CompassToken |
analyzeSingle(String text)
Analyzes the given text, returning the first token. |
CompassAnalyzerHelper |
setAnalyzer(Resource resource)
Sets the analyzer that will be used for the analysis of the text. |
CompassAnalyzerHelper |
setAnalyzer(String analyzerName)
Sets the analyzer that will be used for the analysis of the text. |
CompassAnalyzerHelper |
setAnalyzerByAlias(String alias)
Sets the analyzer that will be used for the analysis of the text. |
| Method Detail |
|---|
CompassAnalyzerHelper setAnalyzer(String analyzerName)
throws CompassException
analyzerName - The analyzer name that will be used.
CompassException
CompassAnalyzerHelper setAnalyzer(Resource resource)
throws CompassException
resource - The resource to derive the analyzer from
CompassException
CompassAnalyzerHelper setAnalyzerByAlias(String alias)
throws CompassException
alias - The alias to derive the analyzer from
CompassException - If the analyzer if not found
CompassToken analyzeSingle(String text)
throws CompassException
text - The text to analyze
CompassException
CompassToken[] analyze(String text)
throws CompassException
text - The text to analyze
CompassException
CompassToken[] analyze(String propertyName,
String text)
throws CompassException
setAnalyzer(Resource)
so the analyzer can be dynamically detected from the resource.
propertyName - The property name for analyze bound propertiestext - The text to analyze
CompassException
CompassToken[] analyze(Reader textReader)
throws CompassException
textReader - The text to analyze
CompassException
CompassToken[] analyze(String propertyName,
Reader textReader)
throws CompassException
setAnalyzer(Resource)
so the analyzer can be dynamically detected from the resource.
propertyName - The property name for analyze bound propertiestextReader - The text to analyze
CompassException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||