AnnotationNode
- class polyglotdb.query.annotations.attributes.base.AnnotationNode(node_type, corpus=None, hierarchy=None)[source]
Class for annotations referenced in graph queries
- Parameters:
- typestr
Annotation type
- posint
Position in the query, defaults to 0
- Attributes:
- typestr
Annotation type
- posint
Position in the query
- previous
AnnotationAttribute Returns the Annotation of the same type with the previous position
- following
AnnotationAttribute Returns the Annotation of the same type with the following position
Methods
__init__(node_type[, corpus, hierarchy])filter_by_subset(*args)adds each item in args to the hierarchy type_labels
follows(other_annotation)for_json()for_match()sets 'token_alias' and 'type_alias' keyword arguments for an annotation
precedes(other_annotation)