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 classThe builder for question answering translator. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Batchifierprotected booleanprotected Localeprotected intprotected intprotected booleanprotected Stringprotected booleanprotected booleanprotected String -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.djl.translate.PostProcessor
processOutputMethods inherited from interface ai.djl.translate.PreProcessor
processInputMethods inherited from interface ai.djl.translate.Translator
batchProcessInput, batchProcessOutput, getExpansions, prepare
-
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:
getBatchifierin interfaceTranslator<QAInput,String> - Returns:
- the
Batchifier
-