public abstract class AbstractExampleBasedTranslationService extends AbstractLanguagePairService implements ExampleBasedTranslationService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractExampleBasedTranslationService()
Constructor that doesn't take parameter(s).
|
AbstractExampleBasedTranslationService(ServiceContext serviceContext)
Constructor that takes the service context and supported language pair(s) as a parameter(s).
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendExamples(String corpusId,
String sourceLang,
String targetLang,
ParallelText[] examples) |
String |
createTrainingCorpus(String sourceLang,
String targetLang,
ParallelText[] examples) |
void |
destroyTrainingCorpus(String corpusId) |
protected abstract void |
doAppendExamples(String corpusId,
Language sourceLang,
Language targetLang,
ParallelText[] examples) |
protected abstract String |
doCreateTrainingCorpus(Language sourceLang,
Language targetLang,
ParallelText[] examples) |
protected abstract void |
doDestroyTrainingCorpus(String corpusId) |
protected abstract TrainingCorpusInfo |
doGetTrainingCorpusInfo(String corpusId) |
protected abstract void |
doReplaceExamples(String corpusId,
Language sourceLang,
Language targetLang,
ParallelText[] examples) |
protected abstract String |
doTranslateWithTrainingCorpus(String[] corpusIds,
Language sourceLang,
Language targetLang,
String source) |
TrainingCorpusInfo |
getTrainingCorpusInfo(String corpusId) |
void |
replaceExamples(String corpusId,
String sourceLang,
String targetLang,
ParallelText[] examples) |
String |
translate(String sourceLang,
String targetLang,
String source) |
String |
translateWithTrainingCorpus(String[] corpusIds,
String sourceLang,
String targetLang,
String source) |
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 AbstractExampleBasedTranslationService()
public AbstractExampleBasedTranslationService(ServiceContext serviceContext)
serviceContext - Service context
s *public String createTrainingCorpus(String sourceLang, String targetLang, ParallelText[] examples) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException
createTrainingCorpus in interface ExampleBasedTranslationServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionProcessFailedExceptionNoValidEndpointsExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionpublic void destroyTrainingCorpus(String corpusId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
public TrainingCorpusInfo getTrainingCorpusInfo(String corpusId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
public void appendExamples(String corpusId, String sourceLang, String targetLang, ParallelText[] examples) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException
appendExamples in interface ExampleBasedTranslationServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionProcessFailedExceptionNoValidEndpointsExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionpublic void replaceExamples(String corpusId, String sourceLang, String targetLang, ParallelText[] examples) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException
replaceExamples in interface ExampleBasedTranslationServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionProcessFailedExceptionNoValidEndpointsExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionpublic String translate(String sourceLang, String targetLang, String source) throws AccessLimitExceededException, InvalidParameterException, LanguagePairNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException
translate in interface ExampleBasedTranslationServiceAccessLimitExceededExceptionInvalidParameterExceptionLanguagePairNotUniquelyDecidedExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionpublic String translateWithTrainingCorpus(String[] corpusIds, String sourceLang, String targetLang, String source) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ProcessFailedException, NoValidEndpointsException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException
translateWithTrainingCorpus in interface ExampleBasedTranslationServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionProcessFailedExceptionNoValidEndpointsExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionprotected abstract String doCreateTrainingCorpus(Language sourceLang, Language targetLang, ParallelText[] examples) throws InvalidParameterException, ProcessFailedException
protected abstract void doDestroyTrainingCorpus(String corpusId) throws InvalidParameterException, ProcessFailedException
protected abstract TrainingCorpusInfo doGetTrainingCorpusInfo(String corpusId) throws InvalidParameterException, ProcessFailedException
protected abstract void doAppendExamples(String corpusId, Language sourceLang, Language targetLang, ParallelText[] examples) throws InvalidParameterException, ProcessFailedException
protected abstract void doReplaceExamples(String corpusId, Language sourceLang, Language targetLang, ParallelText[] examples) throws InvalidParameterException, ProcessFailedException
protected abstract String doTranslateWithTrainingCorpus(String[] corpusIds, Language sourceLang, Language targetLang, String source) throws InvalidParameterException, ProcessFailedException