Package ai.djl.modality.nlp.translator
Class QATranslator
java.lang.Object
ai.djl.modality.nlp.translator.QATranslator
- All Implemented Interfaces:
PostProcessor<String>
,PreProcessor<QAInput>
,Translator<QAInput,
String>
An abstract class to define the question answering translator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The builder for question answering translator. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Batchifier
protected boolean
protected Locale
protected int
protected int
protected boolean
protected String
protected boolean
protected boolean
protected String
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ai.djl.translate.PostProcessor
processOutput
Methods inherited from interface ai.djl.translate.PreProcessor
processInput
Methods inherited from interface ai.djl.translate.Translator
getExpansions, prepare, toBatchTranslator, toBatchTranslator
-
Field Details
-
batchifier
-
tokenizerName
-
vocab
-
locale
-
toLowerCase
protected boolean toLowerCase -
includeTokenTypes
protected boolean includeTokenTypes -
padding
protected boolean padding -
truncation
protected boolean truncation -
maxLength
protected int maxLength -
maxLabels
protected int maxLabels
-
-
Constructor Details
-
QATranslator
-
-
Method Details
-
getBatchifier
Returns theBatchifier
.- Specified by:
getBatchifier
in interfaceTranslator<QAInput,
String> - Returns:
- the
Batchifier
-