udapi.core.document module¶
Document class is a container for UD trees.
- class udapi.core.document.Document(filename=None, **kwargs)[source]¶
Bases:
object
Document is a container for Universal Dependency trees.
- property coref_clusters¶
DEPRECATED: A dict mapping eid to a CorefEntity object.
Substitute doc.coref_clusters.values() and list(doc.coref_clusters.values()) with doc.coref_entities. Otherwise, substitute doc.coref_clusters with doc.eid_to_entity.
- property coref_entities¶
A list of all CorefEntity objects in the document.
- property coref_mentions¶
A sorted list of all CorefMention objects in the document.
- property eid_to_entity¶
A dict mapping each eid (entity ID) to a CorefEntity object.
- property nodes¶
An iterator over all nodes (excluding empty nodes) in the document.
- property nodes_and_empty¶
An iterator over all nodes and empty nodes in the document.
- property trees¶
An iterator over all trees in the document.