class_docstr: A model API that tags input sentence.
  
  Attributes:
      model: Model.
      preprocessor: Transformer. Preprocessing data for feature extraction.
      tokenizer: Tokenize input sentence. Default tokenizer is `str.split`.
docstr: Analyze text and return pretty format.
  
  Args:
      text: string, the input text.
  
  Returns:
      res: dict.
  
  Examples:
      >>> text = 'President Obama is speaking at the White House.'
      >>> model.analyze(text)
      {
          "words": [
              "President",
              "Obama",
              "is",
              "speaking",
              "at",
              "the",
              "White",
              "House."
          ],
          "entities": [
              {
                  "beginOffset": 1,
                  "endOffset": 2,
                  "score": 1,
                  "text": "Obama",
                  "type": "PER"
              },
              {
                  "beginOffset": 6,
                  "endOffset": 8,
                  "score": 1,
                  "text": "White House.",
                  "type": "ORG"
              }
          ]
      }
docstr_tok: ["Analyze","text","and","return","pretty","format",".","Args",":","text",":","string",",","the","input","text",".","Returns",":","res",":","dict",".","Examples",":",">",">",">","text","=","'President","Obama","is","speaking","at","the","White","House",".","'",">",">",">","model.analyze","(","text",")","{","``","words","''",":","[","``","President","''",",","``","Obama","''",",","``","is","''",",","``","speaking","''",",","``","at","''",",","``","the","''",",","``","White","''",",","``","House",".","''","]",",","``","entities","''",":","[","{","``","beginOffset","''",":","1",",","``","endOffset","''",":","2",",","``","score","''",":","1",",","``","text","''",":","``","Obama","''",",","``","type","''",":","``","PER","''","}",",","{","``","beginOffset","''",":","6",",","``","endOffset","''",":","8",",","``","score","''",":","1",",","``","text","''",":","``","White","House",".","``",",","``","type","''",":","``","ORG","''","}","]","}"]
code: def analyze(self, text):
      """Analyze text and return pretty format.
  
      Args:
          text: string, the input text.
  
      Returns:
          res: dict.
  
      Examples:
          >>> text = 'President Obama is speaking at the White House.'
          >>> model.analyze(text)
          {
              "words": [
                  "President",
                  "Obama",
                  "is",
                  "speaking",
                  "at",
                  "the",
                  "White",
                  "House."
              ],
              "entities": [
                  {
                      "beginOffset": 1,
                      "endOffset": 2,
                      "score": 1,
                      "text": "Obama",
                      "type": "PER"
                  },
                  {
                      "beginOffset": 6,
                      "endOffset": 8,
                      "score": 1,
                      "text": "White House.",
                      "type": "ORG"
                  }
              ]
          }
      """
      pred = self.predict_proba(text)
      tags = self._get_tags(pred)
      prob = self._get_prob(pred)
      res = self._build_response(text, tags, prob)
  
      return res
  
file_path: ktrain/ktrain/text/ner/anago/tagger.py
imports: from ....imports import *
  from ..None import metrics
label_desc: Use image node_id 6 for calling the Tagger obj's underlying member method code with example usage: obj.analyze(text) and returns: res