code: def inference(self, doc):
      text_arr = self.process_text(doc)
      intent_type = None
      if self.model_type == "mtl":
          doc_vec = self.vectorize(
              text_arr, self.word_vocab, self.char_vocab
          )
          intent, tags = self.model.predict(doc_vec, batch_size=1)
          intent = int(intent.argmax(1).flatten())
          intent_type = self.intent_vocab.get(intent, None)
          print("Detected intent type: {}".format(intent_type))
      else:
          doc_vec = self.vectorize(text_arr, self.word_vocab, None)
          tags = self.model.predict(doc_vec, batch_size=1)
      tags = tags.argmax(2).flatten()
      tag_str = [self.tags_vocab.get(n, None) for n in tags]
      for t, n in zip(text_arr, tag_str):
          print("{}\t{}\t".format(t, n))
      return self.display_results(text_arr, tag_str, intent_type)
  
file_path: nlp-architect/nlp_architect/api/intent_extraction_api.py
imports: import numpy
  import pickle
  from os import makedirs, path, sys
  from nlp_architect.api.abstract_api import AbstractApi
  from nlp_architect.models.intent_extraction import MultiTaskIntentModel, Seq2SeqIntentModel
  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 7 for calling the IntentExtractionApi obj's underlying member method code with example usage: obj.inference(doc) and returns: self