Uses of Record Class
opennlp.tools.document.Annotation
Packages that use Annotation
Package
Description
-
Uses of Annotation in opennlp.tools.document
Fields in opennlp.tools.document with type parameters of type AnnotationModifier and TypeFieldDescriptionprivate final Map<LayerKey<?>, List<Annotation<?>>> ImmutableDocument.layersMethods in opennlp.tools.document that return AnnotationModifier and TypeMethodDescriptionstatic <T> Annotation<T> Annotation.of(T value) Creates a span-less annotation for adocument-scopedlayer.Methods in opennlp.tools.document that return types with arguments of type AnnotationModifier and TypeMethodDescriptionprivate <T> List<Annotation<?>> ImmutableDocument.copyValidated(LayerKey<T> layer, Document from) Returns a validated immutable copy of one offrom's layers, capturing the key's value type.<T> List<Annotation<T>> Retrieves the annotations of one layer.<T> List<Annotation<T>> Retrieves the annotations of one layer.Method parameters in opennlp.tools.document with type arguments of type AnnotationModifier and TypeMethodDescriptionstatic voidDocumentAnnotators.forEachSentence(List<Annotation<String>> sentences, List<Annotation<String>> tokens, DocumentAnnotators.SentenceTokenConsumer consumer) Walks the token layer sentence by sentence and hands each sentence's contiguous token run to the consumer.static SpanDocumentAnnotators.toCharacterSpan(List<Annotation<String>> tokens, int first, int count, Span span, String source) Maps a span over one sentence's tokens onto the character span those tokens cover.private <T> voidImmutableDocument.validate(LayerKey<T> layer, List<Annotation<T>> annotations) Checks one layer's annotations against the key's contract: no null elements, values assignable to the key's type, spans present and within the text bounds under a positional key, absent under a document-scoped key.static String[]DocumentAnnotators.values(List<Annotation<String>> layer, int first, int count) Collects the values of a contiguous run of annotations, for example the tags of one sentence's tokens duringDocumentAnnotators.forEachSentence(List, List, SentenceTokenConsumer).<T> DocumentDocument.with(LayerKey<T> layer, List<Annotation<T>> annotations) Returns a new document with one layer added.<T> DocumentImmutableDocument.with(LayerKey<T> layer, List<Annotation<T>> annotations) Returns a new document with one layer added.Constructor parameters in opennlp.tools.document with type arguments of type AnnotationModifierConstructorDescriptionprivateImmutableDocument(String text, Map<LayerKey<?>, List<Annotation<?>>> layers) -
Uses of Annotation in opennlp.tools.parser
Method parameters in opennlp.tools.parser with type arguments of type AnnotationModifier and TypeMethodDescriptionprivate voidParserAnnotator.collect(Parse node, int first, int[] starts, int length, List<Annotation<String>> tokens, List<Annotation<ParserAnnotator.Phrase>> phrases) Emits a node and, in pre-order, every phrase node below it. -
Uses of Annotation in opennlp.tools.termvector
Methods in opennlp.tools.termvector that return types with arguments of type AnnotationModifier and TypeMethodDescriptionprivate List<Annotation<TermVector>> TermVectorAnnotator.countVectors(List<Annotation<String>> tokens, AlignedText aligned, String normalized) Aggregates the tokens into scoring-only term vectors, so no offset storage is ever allocated.private List<Annotation<TermVector>> TermVectorAnnotator.fullVectors(List<Annotation<String>> tokens, AlignedText aligned, String normalized) Aggregates the tokens into full term vectors, keeping every occurrence span.Methods in opennlp.tools.termvector with parameters of type AnnotationModifier and TypeMethodDescriptionprivate StringTermVectorAnnotator.termOf(Annotation<String> token, AlignedText aligned, String normalized) Determines the term one token groups under: its covered text as-is, its covered text normalized on its own when a plain per-token normalizer is present, or the covered text of its span mapped into the normalized form when an offset-aware normalizer is present.Method parameters in opennlp.tools.termvector with type arguments of type AnnotationModifier and TypeMethodDescriptionprivate List<Annotation<TermVector>> TermVectorAnnotator.countVectors(List<Annotation<String>> tokens, AlignedText aligned, String normalized) Aggregates the tokens into scoring-only term vectors, so no offset storage is ever allocated.private List<Annotation<TermVector>> TermVectorAnnotator.fullVectors(List<Annotation<String>> tokens, AlignedText aligned, String normalized) Aggregates the tokens into full term vectors, keeping every occurrence span. -
Uses of Annotation in opennlp.tools.tokenize
Method parameters in opennlp.tools.tokenize with type arguments of type AnnotationModifier and TypeMethodDescriptionprivate voidTokenizerAnnotator.addTokens(List<Annotation<String>> tokens, String text, int offset) Tokenizes one stretch of text and appends its tokens, shifted back into document coordinates.