public class DefaultMorphologicalAnalysis extends Object implements MorphologicalAnalysisService
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
pattern |
protected static Pattern |
shortPattern |
Constructor and Description |
---|
DefaultMorphologicalAnalysis() |
Modifier and Type | Method and Description |
---|---|
Morpheme[] |
analyze(String language,
String text)
Morphologically analyzes the text specified by text, language, returns the results.
|
protected Morpheme[] |
doAnalyze(Language language,
String text) |
protected Collection<String> |
split(String text)
文字列をスプリットします。
space ' " ? ! . |
protected static Pattern shortPattern
protected static Pattern pattern
public Morpheme[] analyze(String language, String text) throws AccessLimitExceededException, InvalidParameterException, LanguageNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
MorphologicalAnalysisService
analyze
in interface MorphologicalAnalysisService
language
- Language of text(RFC3066 compliant)text
- Text (required)AccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- Either text or language is null or else an empty string.language does not comply with RFC3066LanguageNotUniquelyDecidedException
- A supported language candidate could not be singly determined (Ex: when the language is specified as zh, the case where zh-Hans and zh-Hant exist as supported languages)UnsupportedLanguageException
- The specified language is not supportedNoAccessPermissionException
- The user executing the call lacks execution privilegesNoValidEndpointsException
- There is no valid endpointProcessFailedException
- Response search failed due to some causeServerBusyException
- The server is loaded and cannot process it.ServiceNotActiveException
- Service not activeServiceNotFoundException
- The specified service was not foundprotected Morpheme[] doAnalyze(Language language, String text) throws InvalidParameterException, ProcessFailedException
protected Collection<String> split(String text)
text
- 対象文字列