DiscourseData
- class polyglotdb.io.discoursedata.DiscourseData(name, annotation_types, hierarchy)[source]
Class for collecting information about a discourse to be loaded
- Parameters:
- namestr
Identifier for the discourse
- annotation_typeslist
List of
BaseAnnotationTypeobjects- hierarchy
Hierarchy Details of how linguistic types relate to one another
- Attributes:
- namestr
Identifier for the discourse
- datadict
Dictionary containing
BaseAnnotationTypeobjects indexed by their name- segment_typestr or None
Identifier of the segment linguistic annotation, if it exists
- wav_pathstr or None
Path to sound file if it exists
Methods
__init__(name, annotation_types, hierarchy)highest_to_lowest()orders hierarchy highest to lowest
items()Returns tuple of items in corpus
keys()Returns corpus keys
types(corpus_name)Get all the types in the discourse and return them along with header information
values()Returns tuple of values in corpus