Package | Description |
---|---|
com.yahoo.document.annotation |
Provides classes and interfaces for creating trees of spans over string
values in Vespa documents, and annotating these spans.
|
com.yahoo.document.serialization |
Modifier and Type | Class and Description |
---|---|
class |
AlternateSpanList
A node in a
SpanNode tree that can have a multiple trees of child nodes, each with its own probability. |
private class |
AlternateSpanList.Children |
(package private) class |
DummySpanNode |
class |
Span
This class represents a range of characters from a string. This is the leaf node
in a Span tree.
|
class |
SpanList
A node in a Span tree that can have child nodes.
|
Modifier and Type | Field and Description |
---|---|
private SpanNode |
InvalidatingIterator.returnedFromNext |
private SpanNode |
SpanTree.root |
private SpanNode |
Annotation.spanNode |
Modifier and Type | Field and Description |
---|---|
private ListIterator<SpanNode> |
InvalidatingIterator.base |
private List<SpanNode> |
SpanList.children |
protected ListIterator<SpanNode> |
RecursiveNodeIterator.iteratorFromLastCallToNext |
private IdentityHashMap<SpanNode,SpanNode> |
AnnotationType2AnnotationContainer.NonRecursiveIterator.nodes |
private IdentityHashMap<SpanNode,SpanNode> |
AnnotationType2AnnotationContainer.NonRecursiveIterator.nodes |
private IdentityHashMap<SpanNode,SpanNode> |
ListAnnotationContainer.AnnotationIterator.nodes |
private IdentityHashMap<SpanNode,SpanNode> |
ListAnnotationContainer.AnnotationIterator.nodes |
protected Stack<PeekableListIterator<SpanNode>> |
RecursiveNodeIterator.stack |
Modifier and Type | Method and Description |
---|---|
SpanNode |
SpanNode.annotate(Annotation annotation)
Convenience method for adding an annotation to this span, same as
getSpanTree(). |
SpanNode |
SpanNode.annotate(AnnotationType type)
Convenience method for adding an annotation with no value to this span, same as
getSpanTree(). |
SpanNode |
SpanNode.annotate(AnnotationType type,
FieldValue value)
Convenience method for adding an annotation to this span, same as
getSpanTree(). |
SpanNode |
SpanNode.annotate(AnnotationType type,
Integer value)
Convenience method for adding an annotation to this span, same as
getSpanTree(). |
SpanNode |
SpanNode.annotate(AnnotationType type,
String value)
Convenience method for adding an annotation to this span, same as
getSpanTree(). |
private SpanNode |
SpanTree.copySpan(SpanNode spanTree) |
SpanNode |
SpanTree.getRoot()
Returns the root node of this span tree.
|
SpanNode |
Annotation.getSpanNode()
Returns the
SpanNode this Annotation is annotating, if any. |
SpanNode |
Annotation.getSpanNodeFast()
Returns the
SpanNode this Annotation is annotating, if any. |
SpanNode |
Span.EmptyIterator.next() |
SpanNode |
InvalidatingIterator.next() |
SpanNode |
RecursiveNodeIterator.next() |
SpanNode |
Span.EmptyIterator.previous() |
SpanNode |
InvalidatingIterator.previous() |
SpanNode |
RecursiveNodeIterator.previous() |
Modifier and Type | Method and Description |
---|---|
ListIterator<SpanNode> |
Span.childIterator()
Returns a ListIterator that iterates over absolutely nothing.
|
ListIterator<SpanNode> |
SpanList.childIterator()
Traverses all immediate children of this SpanList.
|
ListIterator<SpanNode> |
DummySpanNode.childIterator() |
ListIterator<SpanNode> |
AlternateSpanList.childIterator()
Traverses all immediate children of all subtrees of this AlternateSpanList.
|
abstract ListIterator<SpanNode> |
SpanNode.childIterator()
Traverses all immediate children of this SpanNode.
|
ListIterator<SpanNode> |
AlternateSpanList.childIterator(int i)
Traverses all immediate children of the given subtree of this AlternateSpanList.
|
ListIterator<SpanNode> |
Span.childIteratorRecursive()
Returns a ListIterator that iterates over absolutely nothing.
|
ListIterator<SpanNode> |
SpanList.childIteratorRecursive()
Recursively traverses all children (not only leaf nodes) of this SpanList, in a depth-first fashion.
|
ListIterator<SpanNode> |
DummySpanNode.childIteratorRecursive() |
ListIterator<SpanNode> |
AlternateSpanList.childIteratorRecursive()
Recursively traverses all children (not only leaf nodes) of all subtrees of this AlternateSpanList, 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.
|
ListIterator<SpanNode> |
AlternateSpanList.childIteratorRecursive(int i)
Recursively traverses all children (not only leaf nodes) of the given subtree of this AlternateSpanList, in a
depth-first fashion.
|
protected List<SpanNode> |
SpanList.children()
Returns a modifiable list of the immediate children of this SpanList.
|
protected List<SpanNode> |
AlternateSpanList.children()
Returns a modifiable
List of child nodes of first subtree. |
protected List<SpanNode> |
AlternateSpanList.children(int i)
Returns a modifiable
List of child nodes of the specified subtree. |
private List<SpanNode> |
SpanTree.getSpanNodes() |
private static IdentityHashMap<SpanNode,Integer> |
SpanTree.getSpanNodes(SpanTree otherToCopy) |
List<SpanNode> |
AlternateSpanList.removeChildren(int i)
Removes the subtree at index i (both the subtree itself and its contents, which become invalidated).
|
List<SpanNode> |
AlternateSpanList.setChildren(int i,
List<SpanNode> subtree,
double probability)
Sets the subtree at index i.
|
Modifier and Type | Method and Description |
---|---|
AlternateSpanList |
AlternateSpanList.add(int i,
SpanNode node)
Convenience method to add a span node to the child tree at index i.
|
void |
Span.EmptyIterator.add(SpanNode spanNode) |
SpanList |
SpanList.add(SpanNode node)
Adds a child node to this SpanList.
|
void |
InvalidatingIterator.add(SpanNode spanNode) |
AlternateSpanList |
AlternateSpanList.add(SpanNode node)
Adds a child node to the first subtree of this AlternateSpanList.
|
void |
RecursiveNodeIterator.add(SpanNode spanNode) |
SpanTree |
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 |
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 |
SpanTree.annotate(SpanNode node,
AnnotationType type,
FieldValue value)
Adds an Annotation.
|
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.
|
private void |
SpanTree.annotateInternal(SpanNode node,
Annotation annotation) |
(package private) void |
SpanList.checkValidity(SpanNode node,
List<SpanNode> childrenToCheck) |
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 |
SpanNode.compareTo(SpanNode o)
Compares two SpanNodes. Note: this class has a natural ordering that might be inconsistent with equals.
|
boolean |
SpanNode.contains(SpanNode o)
Checks if the text covered by another span is within the text covered by this span.
|
private SpanNode |
SpanTree.copySpan(SpanNode spanTree) |
(package private) Iterator<Annotation> |
SpanNode2AnnotationContainer.iterator(SpanNode node) |
Iterator<Annotation> |
SpanTree.iterator(SpanNode node)
Returns an Iterator over all annotations that annotate the given node.
|
(package private) abstract Iterator<Annotation> |
AnnotationContainer.iterator(SpanNode node)
Returns an Iterator over all annotations that annotate the given node.
|
(package private) Iterator<Annotation> |
IteratingAnnotationContainer.iterator(SpanNode node) |
(package private) Iterator<Annotation> |
SpanNode2AnnotationContainer.iteratorRecursive(SpanNode node) |
Iterator<Annotation> |
SpanTree.iteratorRecursive(SpanNode node)
Returns a recursive Iterator over all annotations that annotate the given node and its subnodes.
|
(package private) abstract Iterator<Annotation> |
AnnotationContainer.iteratorRecursive(SpanNode node)
Returns a recursive Iterator over all annotations that annotate the given node and its subnodes.
|
(package private) Iterator<Annotation> |
IteratingAnnotationContainer.iteratorRecursive(SpanNode node) |
void |
AlternateSpanList.move(int i,
SpanNode node,
AlternateSpanList target,
int targetSubTree)
Moves a child of this SpanList to another SpanList.
|
void |
AlternateSpanList.move(int i,
SpanNode node,
SpanList target)
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 |
SpanList.move(SpanNode node,
SpanList target)
Moves a child of this SpanList to another SpanList.
|
boolean |
SpanNode.overlaps(SpanNode o)
Checks if the text covered by this span overlaps with the text covered by another span.
|
SpanList |
SpanList.remove(SpanNode node)
Removes and invalidates the given SpanNode from this.
|
void |
Span.EmptyIterator.set(SpanNode spanNode) |
void |
InvalidatingIterator.set(SpanNode spanNode) |
void |
RecursiveNodeIterator.set(SpanNode spanNode) |
void |
SpanTree.setRoot(SpanNode root)
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.
|
void |
Annotation.setSpanNodeFast(SpanNode spanNode)
WARNING! Should only be used by deserializers! Sets the span node that this annotation points to.
|
Modifier and Type | Method and Description |
---|---|
void |
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.
|
(package private) void |
SpanList.checkValidity(SpanNode node,
List<SpanNode> childrenToCheck) |
(package private) Iterator<Annotation> |
AnnotationType2AnnotationContainer.iterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
(package private) Iterator<Annotation> |
AnnotationType2AnnotationContainer.iterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
(package private) abstract Iterator<Annotation> |
IteratingAnnotationContainer.iterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
(package private) abstract Iterator<Annotation> |
IteratingAnnotationContainer.iterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
(package private) Iterator<Annotation> |
ListAnnotationContainer.iterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
(package private) Iterator<Annotation> |
ListAnnotationContainer.iterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
List<SpanNode> |
AlternateSpanList.setChildren(int i,
List<SpanNode> subtree,
double probability)
Sets the subtree at index i.
|
Constructor and Description |
---|
SpanTree(String name,
SpanNode root)
Creates a new SpanTree with a given root node.
|
Constructor and Description |
---|
AnnotationIterator(ListIterator<Annotation> baseIt,
IdentityHashMap<SpanNode,SpanNode> nodes) |
AnnotationIterator(ListIterator<Annotation> baseIt,
IdentityHashMap<SpanNode,SpanNode> nodes) |
Children(SpanNodeParent parent,
List<SpanNode> children,
double probability) |
InvalidatingIterator(SpanList owner,
ListIterator<SpanNode> base) |
NonRecursiveIterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
NonRecursiveIterator(IdentityHashMap<SpanNode,SpanNode> nodes) |
RecursiveNodeIterator(ListIterator<SpanNode> it) |
SerialIterator(List<ListIterator<SpanNode>> iterators) |
SpanList(List<SpanNode> children) |
Modifier and Type | Field and Description |
---|---|
private List<SpanNode> |
VespaDocumentDeserializer42.spanNodes
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private SpanNode |
VespaDocumentDeserializer42.readSpanNode()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private List<SpanNode> |
VespaDocumentDeserializer42.readSpanList(SpanNodeParent parent)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
SpanNodeWriter.write(SpanNode spanNode) |
void |
VespaDocumentSerializer42.write(SpanNode spanNode)
Deprecated.
|
Copyright © 2017. All rights reserved.