public abstract class AbstractParaphraseService extends AbstractLanguageService implements ParaphraseService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractParaphraseService()
Constructor that doesn't take parameter(s).
|
AbstractParaphraseService(Collection<Language> supportedLanguages)
Constructor that takes the set of supported languages as a parameter.
|
AbstractParaphraseService(ServiceContext serviceContext,
Collection<Language> supportedLanguages)
Constructor that takes the service context and supported language as a parameter(s).
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Collection<String> |
doParaphrase(Language language,
String text)
Paraphrases the text specified by text,language, returns the results.
|
String[] |
paraphrase(String language,
String text)
Paraphrases the text specified by text,language, returns the results.
|
getSupportedLanguageCollection, getSupportedLanguagePairCollection, getSupportedLanguages, setSupportedLanguageCollection, setSupportedLanguagesacquireSemaphore, 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, setStartupExceptiongetComponentServiceFactory, getFile, getServiceName, setComponentServiceFactory, setServiceNamepublic AbstractParaphraseService()
public AbstractParaphraseService(Collection<Language> supportedLanguages)
supportedLanguages - Set of supported languagespublic AbstractParaphraseService(ServiceContext serviceContext, Collection<Language> supportedLanguages)
serviceContext - Service contextsupportedLanguages - Set of supported languagespublic String[] paraphrase(String language, String text) throws AccessLimitExceededException, InvalidParameterException, LanguageNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
ParaphraseServiceparaphrase in interface ParaphraseServicelanguage - 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 - Paraphrasing process failedServerBusyException - The server is loaded and cannot process it.ServiceNotActiveException - The service is not activeServiceNotFoundException - The specified service was not foundprotected abstract Collection<String> doParaphrase(Language language, String text) throws InvalidParameterException, ProcessFailedException
language - Language of text(RFC3066 compliant)text - Text (required)InvalidParameterException - An invalid parameter was passedProcessFailedException - Process failed