load_discourse_ilg

corpustools.corpus.io.text_ilg.load_discourse_ilg(corpus_name, path, annotation_types, lexicon=None, feature_system_path=None, stop_check=None, call_back=None)[source]

Load a discourse from a text file containing interlinear glosses

Parameters
corpus_namestr

Informative identifier to refer to corpus

pathstr

Full path to text file

annotation_typeslist of AnnotationType

List of AnnotationType specifying how to parse the glosses. Can be generated through inspect_discourse_ilg.

lexiconCorpus, optional

Corpus to store Discourse word information

feature_system_pathstr

Full path to pickled FeatureMatrix to use with the Corpus

stop_checkcallable or None

Optional function to check whether to gracefully terminate early

call_backcallable or None

Optional function to supply progress information during the loading

Returns
Discourse

Discourse object generated from the text file