class_docstr: NER model API
class_docstr_tok: ["NER","model","API"]
code: def inference(self, doc):
      text_arr = self.process_text(doc)
      doc_vec = self.vectorize(
          text_arr, self.word_vocab, self.char_vocab
      )
      seq_len = np.array([len(text_arr)]).reshape(-1, 1)
      inputs = list(doc_vec)
      # pylint: disable=no-member
      inputs = list(doc_vec) + [seq_len]
      doc_ner = (
          self.model.predict(inputs, batch_size=1).argmax(2).flatten()
      )
      tags = [self.y_vocab.get(n, None) for n in doc_ner]
      return self.pretty_print(text_arr, tags)
  
file_path: nlp-architect/nlp_architect/api/ner_api.py
imports: import pickle
  from os import makedirs, path, sys
  import numpy
  from nlp_architect.api.abstract_api import AbstractApi
  from nlp_architect.models.ner_crf import NERCRF
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.utils.generic import pad_sentences
  from nlp_architect.utils.io import download_unlicensed_file
  from nlp_architect.utils.text import SpacyInstance, bio_to_spans
label_desc: Use image node_id 8 for calling the NerApi obj's underlying member method code with example usage: obj.inference(doc) and returns: self