class_docstr: Builder class for BertExample objects.
class_docstr_tok: ["Builder","class","for","BertExample","objects","."]
docstr: Initializes an instance of BertExampleBuilder.
  
  Args:
      label_map: Mapping from tags to tag IDs.
      semiotic_classes: Mapping from semiotic classes to their ids.
      tokenizer: Tokenizer object.
      max_seq_length: Maximum sequence length.
docstr_tok: ["Initializes","an","instance","of","BertExampleBuilder",".","Args",":","label_map",":","Mapping","from","tags","to","tag","IDs",".","semiotic_classes",":","Mapping","from","semiotic","classes","to","their","ids",".","tokenizer",":","Tokenizer","object",".","max_seq_length",":","Maximum","sequence","length","."]
code: def __init__(
      self,
      label_map: Dict[str, int],
      semiotic_classes: Dict[str, int],
      tokenizer: PreTrainedTokenizerBase,
      max_seq_length: int,
  ) -> None:
      """Initializes an instance of BertExampleBuilder.
  
      Args:
          label_map: Mapping from tags to tag IDs.
          semiotic_classes: Mapping from semiotic classes to their ids.
          tokenizer: Tokenizer object.
          max_seq_length: Maximum sequence length.
      """
      self._label_map = label_map
      self._semiotic_classes = semiotic_classes
      self._tokenizer = tokenizer
      self._max_seq_length = max_seq_length
      # one span usually covers one or more words and it only exists for custom phrases, so there are much less spans than characters.
      self._max_spans_length = max(4, int(max_seq_length / 20))
      self._pad_id = self._tokenizer.pad_token_id
      self._default_label = 0
  
file_path: NeMo/nemo/collections/nlp/data/spellchecking_asr_customization/bert_example.py
imports: import logging
  from collections import OrderedDict
  from os import path
  from typing import Dict, List, Optional, Tuple, Union
  from transformers import PreTrainedTokenizerBase
label_desc: Use image node_id 1 to create a new BertExampleBuilder object from inherited base classes: object with example: obj = BertExampleBuilder(label_map, semiotic_classes, tokenizer, max_seq_length)