Uses of Class
com.yahoo.document.annotation.SpanNode
Package
Description
Provides classes and interfaces for creating trees of spans over string
values in Vespa documents, and annotating these spans.
-
Uses of SpanNode in com.yahoo.document.annotation
Modifier and TypeClassDescriptionclass
A node in aSpanNode
tree that can have a multiple trees of child nodes, each with its own probability.class
This class represents a range of characters from a string. This is the leaf node in a Span tree.class
A node in a Span tree that can have child nodes.Modifier and TypeFieldDescriptionprotected ListIterator<SpanNode>
RecursiveNodeIterator.iteratorFromLastCallToNext
RecursiveNodeIterator.stack
Modifier and TypeMethodDescriptionSpanNode.annotate
(Annotation annotation) Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,annotation)
SpanNode.annotate
(AnnotationType type) Convenience method for adding an annotation with no value to this span, same asgetSpanTree().
spanTree.annotate(this,type)
SpanNode.annotate
(AnnotationType type, FieldValue value) Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,type,value)
SpanNode.annotate
(AnnotationType type, Integer value) Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,type,new IntegerFieldValue(value))
SpanNode.annotate
(AnnotationType type, String value) Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,type,new StringFieldValue(value))
SpanTree.getRoot()
Returns the root node of this span tree.Annotation.getSpanNode()
Returns theSpanNode
this Annotation is annotating, if any.final SpanNode
Annotation.getSpanNodeFast()
Returns theSpanNode
this Annotation is annotating, if any.Modifier and TypeMethodDescriptionAlternateSpanList.childIterator()
Traverses all immediate children of all subtrees of this AlternateSpanList.AlternateSpanList.childIterator
(int i) Traverses all immediate children of the given subtree of this AlternateSpanList.Span.childIterator()
Returns a ListIterator that iterates over absolutely nothing.SpanList.childIterator()
Traverses all immediate children of this SpanList.abstract ListIterator<SpanNode>
SpanNode.childIterator()
Traverses all immediate children of this SpanNode.AlternateSpanList.childIteratorRecursive()
Recursively traverses all children (not only leaf nodes) of all subtrees of this AlternateSpanList, in a depth-first fashion.AlternateSpanList.childIteratorRecursive
(int i) Recursively traverses all children (not only leaf nodes) of the given subtree of this AlternateSpanList, in a depth-first fashion.Span.childIteratorRecursive()
Returns a ListIterator that iterates over absolutely nothing.SpanList.childIteratorRecursive()
Recursively traverses all children (not only leaf nodes) of this SpanList, in a depth-first fashion.abstract ListIterator<SpanNode>
SpanNode.childIteratorRecursive()
Recursively traverses all possible children (not only leaf nodes) of this SpanNode, in a depth-first fashion.AlternateSpanList.children()
Returns a modifiableList
of child nodes of first subtree.AlternateSpanList.children
(int i) Returns a modifiableList
of child nodes of the specified subtree.SpanList.children()
Returns a modifiable list of the immediate children of this SpanList.AlternateSpanList.removeChildren
(int i) Removes the subtree at index i (both the subtree itself and its contents, which become invalidated).AlternateSpanList.setChildren
(int i, List<SpanNode> subtree, double probability) Sets the subtree at index i.Modifier and TypeMethodDescriptionConvenience method to add a span node to the child tree at index i.Adds a child node to the first subtree of this AlternateSpanList.Adds a child node to this SpanList.SpanTree.annotate
(SpanNode node, Annotation annotation) Adds an Annotation to the internal list of annotations for this SpanTree. Use this when adding an Annotation that shall annotate a SpanNode.SpanTree.annotate
(SpanNode node, AnnotationType type) Creates an Annotation based on the given AnnotationType, and adds it to the internal list of annotations for this SpanTree (convenience method). Use this when adding an Annotation (that does not have a FieldValue) that shall annotate a SpanNode.SpanTree.annotate
(SpanNode node, AnnotationType type, FieldValue value) Adds an Annotation.final SpanTree
SpanTree.annotateFast
(SpanNode node, Annotation annotation) Adds an Annotation to the internal list of annotations for this SpanTree. Use this when adding an Annotation that shall annotate a SpanNode.void
SpanTree.clearAnnotations
(SpanNode node) Clears all Annotations for a given SpanNode.void
SpanTree.clearAnnotationsRecursive
(SpanNode node) Clears all Annotations for a given SpanNode and its child nodes.int
Compares two SpanNodes. Note: this class has a natural ordering that might be inconsistent with equals.boolean
Checks if the text covered by another span is within the text covered by this span.Returns an Iterator over all annotations that annotate the given node.SpanTree.iteratorRecursive
(SpanNode node) Returns a recursive Iterator over all annotations that annotate the given node and its subnodes.void
AlternateSpanList.move
(int i, SpanNode node, AlternateSpanList target, int targetSubTree) Moves a child of this SpanList to another SpanList.void
Moves a child of this SpanList to another SpanList.void
SpanList.move
(SpanNode node, AlternateSpanList target, int targetSubTree) Moves a child of this SpanList to another SpanList.void
Moves a child of this SpanList to another SpanList.boolean
Checks if the text covered by this span overlaps with the text covered by another span.Removes and invalidates the given SpanNode from this.void
WARNING! Only to be used by deserializers! Sets the root of this SpanTree instance.void
Annotation.setSpanNode
(SpanNode spanNode) WARNING! Should only be used by deserializers! Sets the span node that this annotation points to.final void
Annotation.setSpanNodeFast
(SpanNode spanNode) WARNING! Should only be used by deserializers! Sets the span node that this annotation points to.Modifier and TypeMethodDescriptionvoid
AlternateSpanList.addChildren
(int i, List<SpanNode> subtree, double probability) Adds a possible subtree of this AlternateSpanList, with the given probability, at index i.boolean
AlternateSpanList.addChildren
(List<SpanNode> subtree, double probability) Adds a possible subtree of this AlternateSpanList, with the given probability.AlternateSpanList.setChildren
(int i, List<SpanNode> subtree, double probability) Sets the subtree at index i.ModifierConstructorDescriptionCreates a new SpanTree with a given root node. -
Uses of SpanNode in com.yahoo.document.serialization