Class MxBertQATranslator.Builder

    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected MxBertQATranslator build()
      Builds the translator.
      protected MxBertQATranslator.Builder self()
      Returns the builder.
      MxBertQATranslator.Builder setSeqLength​(int seqLength)
      Set the max length of the sequence to do the padding.
      • Methods inherited from class ai.djl.modality.nlp.translator.QATranslator.BaseBuilder

        configure, optBatchifier, optIncludeTokenTypes, optLocale, optMaxLabels, optMaxLength, optPadding, optTokenizer, optToLowerCase, optTruncation, optVocab
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setSeqLength

        public MxBertQATranslator.Builder setSeqLength​(int seqLength)
        Set the max length of the sequence to do the padding.
        Parameters:
        seqLength - the length of the sequence
        Returns:
        builder
      • build

        protected MxBertQATranslator build()
        Builds the translator.
        Returns:
        the new translator