nlp_architect.common package
Subpackages
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
nlp_architect.common.core_nlp_doc module
-
class
nlp_architect.common.core_nlp_doc.
CoreNLPDoc
(doc_text: str = '', sentences: list = None)[source] 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)}
-
doc_text
-
sentences
-
nlp_architect.common.high_level_doc module
-
class
nlp_architect.common.high_level_doc.
HighLevelDoc
[source] 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 }