class_docstr: Creates dataset to use during inference for token classification tasks with a pretrained model.
  For dataset to use during training with labels, see BertTokenClassificationDataset.
docstr: Initializes BertTokenClassificationInferDataset
  Args:
      queries: text sequences
      max_seq_length: max sequence length minus 2 for [CLS] and [SEP]
      tokenizer: such as AutoTokenizer
docstr_tok: ["Initializes","BertTokenClassificationInferDataset","Args",":","queries",":","text","sequences","max_seq_length",":","max","sequence","length","minus","2","for","[","CLS","]","and","[","SEP","]","tokenizer",":","such","as","AutoTokenizer"]
code: def __init__(
      self,
      queries: List[str],
      max_seq_length: int,
      tokenizer: TokenizerSpec,
  ):
      """
      Initializes BertTokenClassificationInferDataset
      Args:
          queries: text sequences
          max_seq_length: max sequence length minus 2 for [CLS] and [SEP]
          tokenizer: such as AutoTokenizer
      """
      features = get_features(
          queries=queries,
          max_seq_length=max_seq_length,
          tokenizer=tokenizer,
      )
  
      self.all_input_ids = features[0]
      self.all_segment_ids = features[1]
      self.all_input_mask = features[2]
      self.all_subtokens_mask = features[3]
  
imports: import os
  import pickle
  import tempfile
  import time
  from typing import Dict, List, Optional
  import numpy
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.data.data_utils.data_preprocessing import get_stats
  from nemo.core.classes import Dataset
  from nemo.core.neural_types import ChannelType, LabelsType, MaskType, NeuralType
  from nemo.utils import logging
  from nemo.utils.get_rank import is_global_rank_zero
label_desc: Use image node_id 2 to create a new BertTokenClassificationInferDataset object from inherited base classes: Dataset with example: obj = BertTokenClassificationInferDataset(queries, max_seq_length, tokenizer)