public abstract class AbstractLanguageIdentificationService extends AbstractLanguageService implements LanguageIdentificationService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractLanguageIdentificationService() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
doIdentify(String text,
String originalEncoding) |
protected abstract LanguageAndEncoding |
doIdentifyLanguageAndEncoding(byte[] textBytes) |
String[] |
getSupportedEncodings() |
String |
identify(String text,
String originalEncoding) |
LanguageAndEncoding |
identifyLanguageAndEncoding(byte[] textBytes) |
protected void |
setSupportedEncodings(String[] supportedEncodings) |
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, setServiceNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedLanguagespublic AbstractLanguageIdentificationService()
public LanguageAndEncoding identifyLanguageAndEncoding(byte[] textBytes) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
identifyLanguageAndEncoding in interface LanguageIdentificationServiceAccessLimitExceededException - Violated an access restrictionInvalidParameterException - Either text or language is null or else an empty string.language does not comply with RFC3066NoAccessPermissionException - 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 foundpublic String identify(String text, String originalEncoding) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
identify in interface LanguageIdentificationServiceAccessLimitExceededException - Violated an access restrictionInvalidParameterException - Either text or language is null or else an empty string.language does not comply with RFC3066NoAccessPermissionException - 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 foundpublic String[] getSupportedEncodings() throws NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
getSupportedEncodings in interface LanguageIdentificationServiceNoValidEndpointsException - 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 void setSupportedEncodings(String[] supportedEncodings)
protected abstract LanguageAndEncoding doIdentifyLanguageAndEncoding(byte[] textBytes) throws InvalidParameterException, ProcessFailedException
protected abstract String doIdentify(String text, String originalEncoding) throws InvalidParameterException, ProcessFailedException