# nlp_architect.common package

## Subpackages

- nlp_architect.common.cdc package
  - Submodules
  - nlp_architect.common.cdc.cluster module
  - nlp_architect.common.cdc.mention_data module
  - nlp_architect.common.cdc.topics module
  - Module contents

## Submodules

## nlp_architect.common.config module

Generic config object:
  load config from json file load config from ordinary python dict export config as dictionaty or json string define in init default parameters

class `nlp_architect.common.config.``Config`(**kwargs)

  Bases: `abc.ABC`

  Quantization Configuration Object

  `ATTRIBUTES` = {}
  classmethod `from_dict`(json_object)

    Constructs a config from a Python dictionary of parameters.

  classmethod `from_json_file`(json_file)

    Constructs Config from a json file of parameters.

  `to_dict`()

    Serializes this instance to a Python dictionary.

  `to_json_string`()

    Serializes this instance to a JSON string.

## nlp_architect.common.core_nlp_doc module

class `nlp_architect.common.core_nlp_doc.``CoreNLPDoc`(doc_text: str = '', sentences: list = None)

  Bases: `object`

  Object for core-components (POS, Dependency Relations, etc).

  `_doc_text`

    the doc text

  `_sentences`

    list of sentences, each word in a sentence is represented by a dictionary, structured as follows: {‘start’: (int), ‘len’: (int), ‘pos’: (str), ‘ner’: (str), ‘lemma’: (str), ‘gov’: (int), ‘rel’: (str)}

  `brat_doc`()

    Returns doc adapted to BRAT expected input.

  static `decoder`(obj)
  `displacy_doc`()

    Return doc adapted to displacyENT expected input.

  `doc_text`
  `json`()

    Returns json representations of the object.

  `pretty_json`()

    Returns pretty json representations of the object.

  `sent_iter`()
  `sent_text`(i)
  `sentences`

`nlp_architect.common.core_nlp_doc.``find_correct_index`(orig_gov, merged_punct_sentence)

`nlp_architect.common.core_nlp_doc.``fix_gov_indexes`(merged_punct_sentence, sentence)

`nlp_architect.common.core_nlp_doc.``merge_punct_tok`(merged_punct_sentence, last_merged_punct_index, punct_text, is_traverse)

`nlp_architect.common.core_nlp_doc.``merge_punctuation`(sentence)

## nlp_architect.common.high_level_doc module

class `nlp_architect.common.high_level_doc.``HighLevelDoc`

  Bases: `object`

  object for annotation documents

  Parameters: | self.doc_text (str) – document text self.annotation_set (list(str)) – list of all annotations in doc self.spans (list(dict)) – list of span dict, each span_dict is structured as follows: { ‘end’: (int), ‘start’: (int), ‘type’: (str) string of annotation }

  `displacy_doc`()

    Return doc adapted to displacyENT expected input

  `json`()

    Return json representations of the object

    Returns: | json representations of the object
    Return type: | `json`

  `pretty_json`()

    Return pretty json representations of the object

    Returns: | pretty json representations of the object
    Return type: | `json`

## Module contents