public abstract class AbstractTextSummarizeService extends AbstractLanguageService implements TextSummarizeService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS
Constructor and Description |
---|
AbstractTextSummarizeService()
Constructor that doesn't take parameter(s).
|
AbstractTextSummarizeService(ServiceContext serviceContext)
Constructor that takes the service context as a parameter(s).
|
AbstractTextSummarizeService(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 |
---|---|
protected abstract String |
doSummarize(Language language,
String text) |
void |
setMaxSourceLength(int maxSourceLength) |
String |
summarize(String language,
String text) |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSupportedLanguages
public AbstractTextSummarizeService()
public AbstractTextSummarizeService(ServiceContext serviceContext)
serviceContext
- Service contextpublic AbstractTextSummarizeService(ServiceContext serviceContext, Collection<Language> supportedLanguages)
serviceContext
- Service contextsupportedPairs
- Supported language pairspublic String summarize(String language, String text) throws AccessLimitExceededException, InvalidParameterException, LanguageNotUniquelyDecidedException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
summarize
in interface TextSummarizeService
AccessLimitExceededException
InvalidParameterException
LanguageNotUniquelyDecidedException
NoAccessPermissionException
ProcessFailedException
NoValidEndpointsException
ServerBusyException
ServiceNotActiveException
ServiceNotFoundException
UnsupportedLanguageException
public void setMaxSourceLength(int maxSourceLength)
protected abstract String doSummarize(Language language, String text) throws InvalidParameterException, ProcessFailedException