public abstract class AbstractBackTranslationService extends AbstractLanguagePairService implements BackTranslationService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractBackTranslationService()
Constructor.
|
AbstractBackTranslationService(Collection<LanguagePair> supportedPairs)
Constructor.
|
AbstractBackTranslationService(ServiceContext serviceContext,
Collection<LanguagePair> supportedPairs)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
BackTranslationResult |
backTranslate(String sourceLang,
String intermediateLang,
String source)
Runs back translation.
|
protected abstract BackTranslationResult |
doBackTranslation(Language sourceLang,
Language intermediateLang,
String source)
Template method supporting backTranstlate.
|
getSupportedLanguagePairCollection, getSupportedLanguagePairs, setSupportedLanguagePairsacquireSemaphore, 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 AbstractBackTranslationService()
public AbstractBackTranslationService(Collection<LanguagePair> supportedPairs)
supportedPairs - Supported language pairspublic AbstractBackTranslationService(ServiceContext serviceContext, Collection<LanguagePair> supportedPairs)
serviceContext - Service contextsupportedPairs - Supported language pairspublic BackTranslationResult backTranslate(String sourceLang, String intermediateLang, String source) throws AccessLimitExceededException, InvalidParameterException, LanguagePairNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ServiceNotActiveException, ProcessFailedException, ServerBusyException, ServiceNotFoundException, UnsupportedLanguagePairException
BackTranslationServicebackTranslate in interface BackTranslationServicesourceLang - Translation source language (RFC3066 compliant)intermediateLang - Intermediate language (RFC3066 compliant)source - String to be translatedAccessLimitExceededException - Violated an access restrictionInvalidParameterException - An invalid parameter was passedLanguagePairNotUniquelyDecidedException - Multiple candidate language pairs existUnsupportedLanguagePairException - An unsupported language pair was specifiedNoAccessPermissionException - The user executing the call lacks execution privilegesNoValidEndpointsException - There is no valid endpointServiceNotActiveException - The service is not activeProcessFailedException - Response search failed due to some causeServerBusyException - The server is loaded and cannot process it.ServiceNotFoundException - The specified service was not foundprotected abstract BackTranslationResult doBackTranslation(Language sourceLang, Language intermediateLang, String source) throws InvalidParameterException, ProcessFailedException
sourceLang - Translation source languageintermediateLang - Translation intermediate languagesource - String to be translatedInvalidParameterException - An invalid parameter was passedProcessFailedException - Process failed