Uses of Interface
com.gengoai.hermes.Annotation
-
Packages that use Annotation Package Description com.gengoai.hermes Hermes is a framework for Natural Language Processing.com.gengoai.hermes.annotator com.gengoai.hermes.en com.gengoai.hermes.format com.gengoai.hermes.format.conll com.gengoai.hermes.morphology -
-
Uses of Annotation in com.gengoai.hermes
Methods in com.gengoai.hermes that return Annotation Modifier and Type Method Description Annotation
Document. annotation(long id)
Gets an annotation on the document by its ID.default Annotation
HString. asAnnotation()
Gets this HString as an annotation.default Annotation
HString. asAnnotation(@NonNull AnnotationType type)
Attempts to cast this HString to an Annotation of the given type.Annotation
Document. createAnnotation(AnnotationType type, int start, int end, Map<AttributeType<?>,?> attributeMap)
Creates an annotation of the given type encompassing the given span and having the given attributes.Annotation
Document. createAnnotation(AnnotationType type, int start, int end, Map<AttributeType<?>,?> attributeMap, List<Relation> relations)
Creates an annotation of the given type encompassing the given span and having the given attributes.Annotation
Document.AnnotationBuilder. createAttached()
Creates the annotation and attaches it to the documentAnnotation
Document.AnnotationBuilder. createDetached()
Creates the annotation associated, but not attached, to the documentdefault Annotation
HString. first(@NonNull AnnotationType type)
Gets the first annotation overlapping this HString with the given annotation type.default Annotation
HString. firstToken()
Gets the first token annotation overlapping this HString.Annotation
AnnotationSet. get(long id)
Gets the annotation for the given idAnnotation
Relation. getTarget(@NonNull HString hString)
Gets the target of the relation.default Annotation
HString. last(@NonNull AnnotationType type)
Gets the last annotation overlapping this HString with the given annotation type.default Annotation
HString. lastToken()
default Annotation
Annotation. next()
Annotation
AnnotationSet. next(Annotation annotation, AnnotationType type)
Gets the first annotation after a given one of the given typeAnnotation
Document. next(Annotation annotation, AnnotationType type)
Determines the next annotation of the given type after the given annotation (e.g.default Annotation
HString. next(@NonNull AnnotationType type)
Gets the annotation of a given type that is next in order (of span) to this onestatic Annotation
Fragments. orphanedAnnotation(AnnotationType annotationType)
Creates an orphaned empty annotation, i.e.default Annotation
HString. parent()
Gets the dependency parent of this HStringdefault Annotation
Annotation. previous()
Annotation
AnnotationSet. previous(Annotation annotation, AnnotationType type)
Gets the first annotation before a given one of the given typeAnnotation
Document. previous(Annotation annotation, AnnotationType type)
Determines the previous annotation of the given type after the given annotation (e.g.default Annotation
HString. previous(@NonNull AnnotationType type)
Gets the annotation of a given type that is previous in order (of span) to this onedefault Annotation
HString. sentence()
Assumes the HString only overlaps with a single sentence and returns it.default Annotation
HString. tokenAt(int tokenIndex)
Gets the token at the given token index which is a relative offset from this HString.Methods in com.gengoai.hermes that return types with arguments of type Annotation Modifier and Type Method Description List<Annotation>
Document. annotations(AnnotationType type, Span span)
Gets annotations of the given type that overlap with the given span.List<Annotation>
Document. annotations(AnnotationType type, Span span, Predicate<? super Annotation> filter)
Gets annotations of the given type that overlap with the given span and meet the given filter.default List<Annotation>
HString. annotations()
Gets all annotations overlapping this HStringdefault List<Annotation>
HString. annotations(@NonNull AnnotationType type)
Gets annotations of a given type that overlap with this HString.default List<Annotation>
HString. annotations(@NonNull AnnotationType type, @NonNull Predicate<? super Annotation> filter)
Gets annotations of a given type and that test positive for the given filter that overlap with this HString.default Stream<Annotation>
HString. annotationStream()
Gets a java Stream over all annotations overlapping this HString.default Stream<Annotation>
HString. annotationStream(@NonNull AnnotationType type)
Gets a java Stream over annotations of the given type overlapping this HString.default List<Annotation>
Document. children(@NonNull String relation)
default List<Annotation>
HString. children()
Gets all child annotations, i.e.default List<Annotation>
HString. children(@NonNull String relation)
Gets all child annotations, i.e.Edge<Annotation>
RelationEdgeFactory. createEdge(@NonNull Annotation from, @NonNull Annotation to, @NonNull JsonEntry entry)
Edge<Annotation>
RelationEdgeFactory. createEdge(Annotation from, Annotation to, double weight)
default Tuple2<String,Annotation>
Annotation. dependency()
default Tuple2<String,Annotation>
HString. dependency()
default List<Annotation>
Document. enclosedAnnotations()
default List<Annotation>
HString. enclosedAnnotations()
default List<Annotation>
HString. enclosedAnnotations(@NonNull AnnotationType annotationType)
Gets all annotations of the given type enclosed by this HStringSet<Annotation>
RelationGraph. getSubTreeNodes(@NonNull Annotation node, String... childRelations)
Gets the sub-tree for the given node following the given child relations.default List<Annotation>
Document. incoming(RelationType type, boolean includeSubAnnotations)
default List<Annotation>
Document. incoming(RelationType type, String value, boolean includeSubAnnotations)
default List<Annotation>
HString. incoming(@NonNull RelationType type)
Gets all annotations that have relation with this HString as the target where this HString includes all sub-annotations.default List<Annotation>
HString. incoming(@NonNull RelationType type, boolean includeSubAnnotations)
Gets all annotations that have relation with this HString as the target.default List<Annotation>
HString. incoming(@NonNull RelationType type, @NonNull String value, boolean includeSubAnnotations)
Gets all annotations that have relation with this HString as the target.default List<Annotation>
HString. incoming(RelationType type, String value)
Gets all annotations that have relation with this HString as the target where this HString includes all sub-annotations.default List<Annotation>
HString. interleaved(AnnotationType... types)
Returns the annotations of the given types that overlap this string in a maximum match fashion.Iterator<Annotation>
AnnotationSet. iterator()
default List<Annotation>
Document. outgoing(RelationType type, boolean includeSubAnnotations)
default List<Annotation>
Document. outgoing(RelationType type, String value, boolean includeSubAnnotations)
default List<Annotation>
HString. outgoing(@NonNull RelationType type, boolean includeSubAnnotations)
Gets all annotations with which this HString has an outgoing relation of the given type.default List<Annotation>
HString. outgoing(@NonNull RelationType type, String value, boolean includeSubAnnotations)
Gets all annotations with which this HString has an outgoing relation of the given type and value.default List<Annotation>
HString. outgoing(RelationType type)
Gets all annotations with which this HString or any of its sub-annotations has an outgoing relation of the given type.default List<Annotation>
HString. outgoing(RelationType type, String value)
Gets all annotations with which this HString or any of its sub-annotations has an outgoing relation of the given type and value.List<Annotation>
AnnotationSet. removeAll(AnnotationType type)
Removes all annotations of a given type and marks that type as not completed.List<Annotation>
AnnotationSet. select(Span span, Predicate<? super Annotation> criteria)
Selects all annotations of a given annotation type within a given range and matching a given criteria.List<Annotation>
AnnotationSet. select(Predicate<? super Annotation> criteria)
Selects all annotations of a given annotation type and matching a given criteria.default List<Annotation>
HString. sentences()
Gets the sentences overlapping this HStringdefault Stream<Annotation>
HString. sentenceStream()
Gets a java Stream over the sentences overlapping this HString.default List<Annotation>
HString. startingHere(@NonNull AnnotationType type)
Gets annotations of a given type that have the same starting offset as this HString.Stream<Annotation>
AnnotationSet. stream()
default List<Annotation>
HString. tokens()
Gets the tokens overlapping this HString.default Stream<Annotation>
HString. tokenStream()
Gets a java Stream over the tokens overlapping this HString.Methods in com.gengoai.hermes with parameters of type Annotation Modifier and Type Method Description boolean
AnnotationSet. add(Annotation annotation)
Adds an annotation to the setRelationEdge
RelationGraph. addEdge(Annotation fromVertex, Annotation toVertex)
RelationEdge
RelationGraph. addEdge(Annotation fromVertex, Annotation toVertex, double weight)
void
Document. attach(Annotation annotation)
Attaches the given annotation to the document.boolean
AnnotationSet. contains(Annotation annotation)
Checks if an annotation is in the set or notboolean
Document. contains(Annotation annotation)
Determines if the given annotation is attached to this document.Edge<Annotation>
RelationEdgeFactory. createEdge(@NonNull Annotation from, @NonNull Annotation to, @NonNull JsonEntry entry)
Edge<Annotation>
RelationEdgeFactory. createEdge(Annotation from, Annotation to, double weight)
static RelationEdge
RelationEdge. from(@NonNull Annotation source, @NonNull Relation relation)
RelationEdge
RelationGraph. getEdge(Annotation v1, Annotation v2)
Set<RelationEdge>
RelationGraph. getEdges(Annotation vertex)
Set<RelationEdge>
RelationGraph. getInEdges(Annotation vertex)
Set<RelationEdge>
RelationGraph. getOutEdges(Annotation vertex)
Set<Annotation>
RelationGraph. getSubTreeNodes(@NonNull Annotation node, String... childRelations)
Gets the sub-tree for the given node following the given child relations.HString
RelationGraph. getSubTreeText(Annotation node, boolean includeGiven)
Gets the text covering the sub-tree with this node (if includeGiven is true)Annotation
AnnotationSet. next(Annotation annotation, AnnotationType type)
Gets the first annotation after a given one of the given typeAnnotation
Document. next(Annotation annotation, AnnotationType type)
Determines the next annotation of the given type after the given annotation (e.g.Annotation
AnnotationSet. previous(Annotation annotation, AnnotationType type)
Gets the first annotation before a given one of the given typeAnnotation
Document. previous(Annotation annotation, AnnotationType type)
Determines the previous annotation of the given type after the given annotation (e.g.boolean
AnnotationSet. remove(Annotation annotation)
Removes an annotation from the documentboolean
Document. remove(Annotation annotation)
Removes the given annotation from the documentRelationEdge
RelationGraph. removeEdge(Annotation fromVertex, Annotation toVertex)
List<RelationEdge>
RelationGraph. shortestConnection(@NonNull Annotation source, @NonNull Annotation target)
Determines the shortest connection (undirected) between the source and target annotationList<RelationEdge>
RelationGraph. shortestPath(@NonNull Annotation source, @NonNull Annotation target)
Determines the shortest path (directed) between the source and target annotationMethod parameters in com.gengoai.hermes with type arguments of type Annotation Modifier and Type Method Description List<Annotation>
Document. annotations(AnnotationType type, Span span, Predicate<? super Annotation> filter)
Gets annotations of the given type that overlap with the given span and meet the given filter.default List<Annotation>
HString. annotations(@NonNull AnnotationType type, @NonNull Predicate<? super Annotation> filter)
Gets annotations of a given type and that test positive for the given filter that overlap with this HString.RelationGraph
RelationGraph. filterByVertex(@NonNull Predicate<? super Annotation> vertexPredicate)
Filters the graph by evaluating the edges using the given predicate.default void
HString. forEach(@NonNull AnnotationType type, @NonNull Consumer<? super Annotation> consumer)
Convenience method for processing annotations of a given type.List<Annotation>
AnnotationSet. select(Span span, Predicate<? super Annotation> criteria)
Selects all annotations of a given annotation type within a given range and matching a given criteria.List<Annotation>
AnnotationSet. select(Predicate<? super Annotation> criteria)
Selects all annotations of a given annotation type and matching a given criteria.default List<HString>
HString. split(Predicate<? super Annotation> delimiterPredicate)
Splits this HString using the given predicate to apply against tokens.Constructors in com.gengoai.hermes with parameters of type Annotation Constructor Description RelationEdge(@NonNull Annotation source, @NonNull Annotation target)
Instantiates a new Relation edge. -
Uses of Annotation in com.gengoai.hermes.annotator
Methods in com.gengoai.hermes.annotator that return Annotation Modifier and Type Method Description protected Annotation
SubTypeAnnotator. compare(Annotation a1, Annotation a2)
Methods in com.gengoai.hermes.annotator that return types with arguments of type Annotation Modifier and Type Method Description protected List<Annotation>
SubTypeAnnotator. getAnnotations(HString fragment)
Methods in com.gengoai.hermes.annotator with parameters of type Annotation Modifier and Type Method Description protected void
DefaultDependencyAnnotator. annotate(Annotation sentence)
protected void
DefaultPartOfSpeechAnnotator. annotate(Annotation sentence)
protected void
DefaultPhraseChunkAnnotator. annotate(Annotation sentence)
protected void
DefaultTokenTypeEntityAnnotator. annotate(Annotation sentence)
protected void
LexiconAnnotator. annotate(@NonNull Annotation sentence)
protected abstract void
SentenceLevelAnnotator. annotate(Annotation sentence)
Annotates a single sentence.protected void
ViterbiAnnotator. annotate(Annotation sentence)
protected Annotation
SubTypeAnnotator. compare(Annotation a1, Annotation a2)
-
Uses of Annotation in com.gengoai.hermes.en
Methods in com.gengoai.hermes.en with parameters of type Annotation Modifier and Type Method Description protected boolean
ENStopWords. isTokenStopWord(Annotation token)
-
Uses of Annotation in com.gengoai.hermes.format
Methods in com.gengoai.hermes.format with parameters of type Annotation Modifier and Type Method Description String
CoNLLColumnProcessor. processOutput(HString document, Annotation token, int index)
Generates output data in CoNLL format -
Uses of Annotation in com.gengoai.hermes.format.conll
Methods in com.gengoai.hermes.format.conll with parameters of type Annotation Modifier and Type Method Description String
CategoryProcessor. processOutput(HString document, Annotation token, int index)
String
DependencyLinkProcessor. processOutput(HString document, Annotation token, int index)
String
DependencyRelationProcessor. processOutput(HString document, Annotation token, int index)
String
IndexProcessor. processOutput(HString document, Annotation token, int index)
String
IOBFieldProcessor. processOutput(HString document, Annotation token, int index)
String
LemmaProcessor. processOutput(HString document, Annotation token, int index)
String
MorphologicalFeatureProcessor. processOutput(HString document, Annotation token, int index)
String
NoOptProcessor. processOutput(HString document, Annotation token, int index)
String
POSFieldProcessor. processOutput(HString sentence, Annotation token, int index)
String
UPOSProcessor. processOutput(HString document, Annotation token, int index)
String
WordProcessor. processOutput(HString document, Annotation token, int index)
-
Uses of Annotation in com.gengoai.hermes.morphology
Methods in com.gengoai.hermes.morphology with parameters of type Annotation Modifier and Type Method Description protected abstract boolean
StopWords. isTokenStopWord(Annotation token)
Checks if the given token is a stopwordprotected boolean
StopWords.NoOptStopWords. isTokenStopWord(Annotation token)
-