class_docstr: Implementation of the NER vocabulary
  
  Params:
      word_file_path: the path to the pre-trained word embedding model
      save_path: the folder path to save dictionary files
      load_path: the folder path from which the dictionary files are loaded
      char_level: the flag arg indicating the character vocabulary
class_docstr_tok: ["Implementation","of","the","NER","vocabulary","Params",":","word_file_path",":","the","path","to","the","pre-trained","word","embedding","model","save_path",":","the","folder","path","to","save","dictionary","files","load_path",":","the","folder","path","from","which","the","dictionary","files","are","loaded","char_level",":","the","flag","arg","indicating","the","character","vocabulary"]
code: def fit(self, sents: [List[List[str]]], *args):
      if self.word_file_path is not None:
          return
  
      if self.char_level:
          items = set(
              [char for sent in sents for word in sent for char in word]
          )
      else:
          items = set([word for sent in sents for word in sent])
      items = ["<UNK>", "<PAD>"] + list(items)
  
      self._t2i = {k: v for v, k in enumerate(items)}
      self._i2t = {k: v for k, v in enumerate(items)}
  
      self.save_to_file(self.save_path)
  
file_path: DeepPavlov/deeppavlov/models/preprocessors/ner_preprocessor.py
imports: import errno
  import os
  from logging import getLogger
  from typing import List
  import numpy
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.estimator import Estimator
label_desc: Use image node_id 4 for calling the NerVocab obj's underlying member method code with example usage: obj.fit(sents) without return types