class_docstr: NER model API
class_docstr_tok: ["NER","model","API"]
code: def pretty_print(text, tags):
      spans = []
      for s, e, tag in bio_to_spans(text, tags):
          spans.append({"start": s, "end": e, "type": tag})
      ents = dict((obj["type"].lower(), obj) for obj in spans).keys()
      ret = {
          "doc_text": " ".join(text),
          "annotation_set": list(ents),
          "spans": spans,
          "title": "None",
      }
      print({"doc": ret, "type": "high_level"})
      return {"doc": ret, "type": "high_level"}
  
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 5 for calling the NerApi obj's underlying member method code with example usage: obj.pretty_print(text, tags) and returns: dict