Package ai.djl.huggingface.translator
Class TextClassificationTranslator.Builder
java.lang.Object
ai.djl.huggingface.translator.TextClassificationTranslator.Builder
- Enclosing class:
- TextClassificationTranslator
The builder for token classification translator.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the translator.voidConfigures the builder with the model arguments.optBatchifier(ai.djl.translate.Batchifier batchifier) Sets theBatchifierfor theTranslator.
-
Method Details
-
optBatchifier
Sets theBatchifierfor theTranslator.- Parameters:
batchifier- true to include token types- Returns:
- this builder
-
configure
Configures the builder with the model arguments.- Parameters:
arguments- the model arguments
-
build
Builds the translator.- Returns:
- the new translator
- Throws:
IOException- if I/O error occurs
-