public class KantanMTv21Connector extends BaseConnector
open() method.| Modifier and Type | Class and Description |
|---|---|
protected static class |
KantanMTv21Connector.RequestInfo
Wrapper to hold the original fragment along with its extracted codes, so
that we can reinsert them into the translated target.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
STATE_INITIALISING |
static String |
STATE_OFFLINE |
static String |
STATE_RUNNING |
static String |
STATE_TERMINATING |
| Constructor and Description |
|---|
KantanMTv21Connector() |
| Modifier and Type | Method and Description |
|---|---|
List<List<QueryResult>> |
batchQuery(List<TextFragment> fragments)
Slow default implementation using query!!
Override to take advantage of servers batch API
|
void |
close()
Closes this connector.
|
String |
getEngines()
Gets the information about the available engines.
|
String |
getEngineStatus(String engine)
Get the status of an engine.
|
String |
getName()
Gets the name of the connector.
|
KantanMTv21ConnectorParameters |
getParameters()
Gets the current parameters of this connector.
|
String |
getSettingsDisplay()
Gets a display representation of the current settings for this connector.
|
boolean |
hasNext()
Indicates of there is a hit available.
|
QueryResult |
next()
Gets the next hit for the last query.
|
void |
open()
Opens this query engine.
|
int |
query(String plainText)
Starts a query for a give plain text.
|
int |
query(TextFragment tf)
Starts a query for a given text.
|
String |
startEngine(String engine)
Starts an engine (do nothing if it's already started).
|
String |
stopEngine(String engine)
Stops an engine (do nothing if it's already stopped).
|
protected String |
toInternalCode(LocaleId locId)
Converts a locale identifier to the internal string value for a language/locale code for this connector.
|
batchLeverage, batchLeverageUsingBatchQuery, batchQueryText, clearAttributes, getNoQueryThreshold, getSourceLanguage, getTargetLanguage, getWeight, leverage, leverageUsingBatchQuery, removeAttribute, setAttribute, setLanguages, setNoQueryThreshold, setParameters, setRootDirectory, setWeightclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removepublic static final String STATE_OFFLINE
public static final String STATE_RUNNING
public static final String STATE_INITIALISING
public static final String STATE_TERMINATING
public String getName()
IQuerypublic String getSettingsDisplay()
IQuerypublic void open()
IQuerypublic void close()
IQuerypublic KantanMTv21ConnectorParameters getParameters()
IQuerygetParameters in interface IQuerygetParameters in class BaseConnectorprotected String toInternalCode(LocaleId locId)
BaseConnectortoInternalCode in class BaseConnectorlocId - the locale identifier to convert.public int query(String plainText)
IQueryplainText - text to query.public int query(TextFragment tf)
IQuerytf - The text to query.public boolean hasNext()
IQueryhasNext in interface Iterator<QueryResult>hasNext in interface IQueryhasNext in class BaseConnectorpublic QueryResult next()
IQuerynext in interface Iterator<QueryResult>next in interface IQuerynext in class BaseConnectorpublic List<List<QueryResult>> batchQuery(List<TextFragment> fragments)
BaseConnectorbatchQuery in interface IQuerybatchQuery in class BaseConnectorfragments - list of the text fragments to translate.public String getEngines()
public String getEngineStatus(String engine)
engine - the name of the engine to check.public String startEngine(String engine)
engine - the name of the engine to start.Copyright © 2022. All rights reserved.