public class SimpleText2TextTranslator extends java.lang.Object implements Translator<java.lang.String,java.lang.String>
Translator that performs pre-process and post-processing for a sequence-to-sequence
text model.| Constructor and Description |
|---|
SimpleText2TextTranslator() |
| Modifier and Type | Method and Description |
|---|---|
Batchifier |
getBatchifier()
Gets the
Batchifier. |
NDList |
processInput(TranslatorContext ctx,
java.lang.String input)
Processes the input and converts it to NDList.
|
java.lang.String |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpreparegetPipelinepublic java.lang.String processOutput(TranslatorContext ctx, NDList list)
processOutput in interface PostProcessor<java.lang.String>ctx - the toolkit used for post-processinglist - the output NDList after inferencepublic NDList processInput(TranslatorContext ctx, java.lang.String input)
processInput in interface PreProcessor<java.lang.String>ctx - the toolkit for creating the input NDArrayinput - the input objectNDList after pre-processingpublic Batchifier getBatchifier()
Batchifier.getBatchifier in interface Translator<java.lang.String,java.lang.String>Batchifier