public abstract class AbstractMorphologicalAnalysisService extends AbstractLanguageService implements MorphologicalAnalysisService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS
Constructor and Description |
---|
AbstractMorphologicalAnalysisService()
Constructor that doesn't take parameter(s).
|
AbstractMorphologicalAnalysisService(Collection<Language> supportedLanguages)
Constructor that takes the set of supported languages as a parameter.
|
AbstractMorphologicalAnalysisService(ServiceContext serviceContext,
Collection<Language> supportedLanguages)
Constructor that takes the service context and supported language pair(s) as a parameter(s).
|
Modifier and Type | Method and Description |
---|---|
Morpheme[] |
analyze(String language,
String text)
Morphologically analyzes the text specified by text, language, returns the results.
|
protected abstract Collection<Morpheme> |
doAnalyze(Language language,
String text)
Execute morphological analysis process.
|
getSupportedLanguageCollection, getSupportedLanguagePairCollection, getSupportedLanguages, setSupportedLanguageCollection, setSupportedLanguages
acquireSemaphore, checkStartupException, convertLanguagePairs, convertLanguages, doGetLastUpdate, getCurrentServiceContext, getDoDoubleSearch, getEliminateDuplicates, getInitParameter, getInitParameterBoolean, getInitParameterInt, getInitParameterLong, getInitParameters, getInitParameterString, getInitParameterUsingTransformer, getLastUpdate, getLogListener, getMaxResults, getMaxWaitMillisForExternalProcess, getRequestMimeHeaders, getServiceContext, getWorkDirectory, getWorkFile, log, parseDateMacro, processEnd, processEnd, processLap, processStart, releaseSemaphore, setCurrentServiceContext, setDoubleSearchResults, setEliminateDuplicates, setLogListener, setMaxResults, setMaxThreads, setMaxWaitMillisForExternalProcess, setMaxWaitMillisForThread, setMeasureProcessTime, setProcessTimeWarningThreasholdMillis, setStartupException
getComponentServiceFactory, getFile, getServiceName, setComponentServiceFactory, setServiceName
public AbstractMorphologicalAnalysisService()
public AbstractMorphologicalAnalysisService(Collection<Language> supportedLanguages)
supportedLanguages
- Set of supported languagespublic AbstractMorphologicalAnalysisService(ServiceContext serviceContext, Collection<Language> supportedLanguages)
serviceContext
- Service contextsupportedLanguages
- Set of supported languagespublic 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 abstract Collection<Morpheme> doAnalyze(Language language, String text) throws InvalidParameterException, ProcessFailedException
language
- Languagetext
- Sentence to analyzeInvalidParameterException
- An invalid parameter was passedProcessFailedException
- Process failed