# nlp_architect.api package

## Submodules

## nlp_architect.api.abstract_api module

class `nlp_architect.api.abstract_api.``AbstractApi`

  Bases: `object`

  Abstract class for API’s to the server

  `inference`(doc)
  `load_model`()

## nlp_architect.api.base module

class `nlp_architect.api.base.``ModelAPI`(model_path: str = None)

  Bases: `object`

  Base class for a model API implementation Implementing classes must provide a default model and/or a path to a model

  Parameters: | model_path (str) – path to a trained model

  run method must return

  `default_model` = None
  `load_model`(model_path: str)
  `run`(inputs: Union[str, List[str]]) → Dict[KT, VT]

## nlp_architect.api.bist_parser_api module

class `nlp_architect.api.bist_parser_api.``BistParserApi`

  Bases: `nlp_architect.api.abstract_api.AbstractApi`

  Bist Parser API

  `inference`(doc)

    Parse according to SpacyBISTParser’s model

    Parameters: | doc (str) – the doc str
    Returns: | the parser’s response hosted in CoreNLPDoc object
    Return type: | CoreNLPDoc

  `load_model`()

    Load SpacyBISTParser model

## nlp_architect.api.intent_extraction_api module

class `nlp_architect.api.intent_extraction_api.``IntentExtractionApi`(prompt=True)

  Bases: `nlp_architect.api.abstract_api.AbstractApi`

  static `display_results`(text_str, predictions, intent_type)
  `inference`(doc)
  `load_model`()
  `model_dir` = '/Users/pizsak/nlp-architect/cache/intent-pretrained'
  `pretrained_model` = '/Users/pizsak/nlp-architect/cache/intent-pretrained/model.h5'
  `pretrained_model_info` = '/Users/pizsak/nlp-architect/cache/intent-pretrained/model_info.dat'
  `process_text`(text)
  `vectorize`(doc, vocab, char_vocab=None)

## nlp_architect.api.ner_api module

class `nlp_architect.api.ner_api.``NerApi`(prompt=True)

  Bases: `nlp_architect.api.abstract_api.AbstractApi`

  NER model API

  `inference`(doc)
  `load_model`()
  `model_dir` = '/Users/pizsak/nlp-architect/cache/ner-pretrained'
  `pretrained_model` = '/Users/pizsak/nlp-architect/cache/ner-pretrained/model_v4.h5'
  `pretrained_model_info` = '/Users/pizsak/nlp-architect/cache/ner-pretrained/model_info_v4.dat'
  static `pretty_print`(text, tags)
  `process_text`(text)
  `vectorize`(doc, vocab, char_vocab)

## Module contents