code: def __init__(
      self,
      vocab_path: str,
      dataset: Generic = None,
      max_seq_len: int = 512,
      do_lower_case: bool = True,
      random_seed: int = None,
      sp_model_path: str = None,
      word_dict_path: str = None,
      in_tokens: bool = False,
  ):
      super(BaseNLPReader, self).__init__(dataset, random_seed)
      self.max_seq_len = max_seq_len
      if sp_model_path and word_dict_path:
          self.tokenizer = tokenization.WSSPTokenizer(
              vocab_path,
              sp_model_path,
              word_dict_path,
              ws=True,
              lower=True,
          )
      else:
          self.tokenizer = tokenization.FullTokenizer(
              vocab_file=vocab_path, do_lower_case=do_lower_case
          )
      self.vocab = self.tokenizer.vocab
      self.pad_id = self.vocab["[PAD]"]
      self.cls_id = self.vocab["[CLS]"]
      self.sep_id = self.vocab["[SEP]"]
      self.mask_id = self.vocab["[MASK]"]
      self.in_tokens = in_tokens
  
      self.Record_With_Label_Id = namedtuple(
          "Record",
          ["token_ids", "text_type_ids", "position_ids", "label_id"],
      )
      self.Record_Wo_Label_Id = namedtuple(
          "Record", ["token_ids", "text_type_ids", "position_ids"]
      )
  
imports: from collections import namedtuple
  from typing import Callable, Generator, Generic, List
  import numpy
  from paddlehub.utils.log import logger
  from paddlehub.compat.task import tokenization
  from paddlehub.compat.task.batch import pad_batch_data
label_desc: Use image node_id 1 to create a new BaseNLPReader object from inherited base classes: BaseReader with example: obj = BaseNLPReader(vocab_path, dataset, max_seq_len, do_lower_case, random_seed, sp_model_path, word_dict_path, in_tokens)