Uses of Interface
com.gengoai.hermes.HString
-
-
Uses of HString in com.gengoai.hermes
Subinterfaces of HString in com.gengoai.hermes Modifier and Type Interface Description interface
Annotation
An annotation is anHString
that associates anAnnotationType
, e.g.interface
Document
A document represents text content with an accompanying set of metadata (Attributes), linguistic overlays (Annotations), and relations between elements in the document.Methods in com.gengoai.hermes that return HString Modifier and Type Method Description default HString
HString. context(int windowSize)
Generates a new HString consisting of this HString and its given window size (number) of tokens to the left and right.default HString
HString. context(@NonNull AnnotationType type, int windowSize)
Generates a new HString consisting of this HString and its given window size (number) of annotation type to the left and right.static HString
Fragments. emptyHString(Document document)
Creates an empty HString associated with the given document.default HString
HString. find(String text)
Finds the given text in this HString starting from the beginning of this HString.default HString
HString. find(String text, int start)
Finds the given text in this HString starting from the given start index of this HString.HString
RelationGraph. getSubTreeText(Annotation node, boolean includeGiven)
Gets the text covering the sub-tree with this node (if includeGiven is true)default HString
HString. head()
Gets the token that is highest in the dependency tree for this HStringdefault HString
HString. leftContext(int windowSize)
Generates an HString representing thewindowSize
tokens to the left of the start of this HString.default HString
HString. leftContext(@NonNull AnnotationType type, int windowSize)
Generates an HString representing thewindowSize
of given annotation types to the left of the start of this HString.default HString
HString. rightContext(int windowSize)
Generates an HString representing thewindowSize
tokens to the right of the end of this HString without going past the sentence end.default HString
HString. rightContext(@NonNull AnnotationType type, int windowSize)
Generates an HString representing thewindowSize
of given annotation types to the right of the end of this HString without going past the sentence end.static HString
Fragments. span(Document document, int start, int end)
Creates an HString which is a span, i.e.static HString
Fragments. stringWrapper(@NonNull String content)
Creates a new HString that has content, but no document associated with itdefault HString
HString. substring(int relativeStart, int relativeEnd)
Returns a new HString that is a substring of this one.static HString
HString. toHString(Object o)
Helper function for converting an Object into an HString.default HString
HString. trim(@NonNull Predicate<? super HString> toTrimPredicate)
Trims tokens off the left and right of this HString that match the given predicate.default HString
HString. trimLeft(@NonNull Predicate<? super HString> toTrimPredicate)
Trims tokens off the left of this HString that match the given predicate.default HString
HString. trimRight(@NonNull Predicate<? super HString> toTrimPredicate)
Trims tokens off the right of this HString that match the given predicate.default HString
HString. union(@NonNull HString other)
Creates a new string by performing a union over the spans of this HString and at least one more HString.static HString
HString. union(@NonNull HString first, @NonNull HString second, @NonNull HString... others)
Creates a new string by performing a union over the spans of two or more HStrings.static HString
HString. union(@NonNull Iterable<? extends HString> strings)
Creates a new string by performing a union over the spans of two or more HStrings.Methods in com.gengoai.hermes that return types with arguments of type HString Modifier and Type Method Description default List<HString>
HString. charNGrams(int order)
Extracts character n-grams of the given order (e.g.default List<HString>
HString. charNGrams(int minOrder, int maxOrder)
Extracts all character n-grams from the given minimum to given maximum order (e.g.default Stream<HString>
HString. findAll(String text)
Finds all occurrences of the given text in this HStringdefault List<HString>
HString. split(Predicate<? super Annotation> delimiterPredicate)
Splits this HString using the given predicate to apply against tokens.Methods in com.gengoai.hermes with parameters of type HString Modifier and Type Method Description Document.AnnotationBuilder
Document.AnnotationBuilder. attributes(HString copy)
Adds attributes to this annotation by copying the attributes of another HString object.default boolean
HString. encloses(HString other)
Checks if this HString encloses the given other HString.Document.AnnotationBuilder
Document.AnnotationBuilder. from(@NonNull HString hString)
Sets the bounds, and adds the relations and attributes from the given HString to this builder.Annotation
Relation. getTarget(@NonNull HString hString)
Gets the target of the relation.default boolean
HString. overlaps(HString other)
Checks if this HString overlaps with the given other.default void
HString. putAll(@NonNull HString hString)
Copies the attribute values from the given HString to this onedefault HString
HString. union(@NonNull HString other)
Creates a new string by performing a union over the spans of this HString and at least one more HString.static HString
HString. union(@NonNull HString first, @NonNull HString second, @NonNull HString... others)
Creates a new string by performing a union over the spans of two or more HStrings.Method parameters in com.gengoai.hermes with type arguments of type HString Modifier and Type Method Description default NDArray
HString. embedding(@NonNull Predicate<HString> filter)
default void
HString. ifNotEmpty(@NonNull Consumer<? super HString> processor)
Runs the given processor on the HString if it is not empty.default HString
HString. trim(@NonNull Predicate<? super HString> toTrimPredicate)
Trims tokens off the left and right of this HString that match the given predicate.default HString
HString. trimLeft(@NonNull Predicate<? super HString> toTrimPredicate)
Trims tokens off the left of this HString that match the given predicate.default HString
HString. trimRight(@NonNull Predicate<? super HString> toTrimPredicate)
Trims tokens off the right of this HString that match the given predicate.static HString
HString. union(@NonNull Iterable<? extends HString> strings)
Creates a new string by performing a union over the spans of two or more HStrings. -
Uses of HString in com.gengoai.hermes.annotator
Methods in com.gengoai.hermes.annotator with parameters of type HString Modifier and Type Method Description protected List<Annotation>
SubTypeAnnotator. getAnnotations(HString fragment)
protected LexiconEntry
FuzzyLexiconAnnotator. scoreSpan(HString span)
protected abstract LexiconEntry
ViterbiAnnotator. scoreSpan(HString span)
Scores the given span. -
Uses of HString in com.gengoai.hermes.corpus
Method parameters in com.gengoai.hermes.corpus with type arguments of type HString Modifier and Type Method Description default Corpus
Corpus. apply(Lexicon lexicon, SerializableConsumer<HString> onMatch)
default DocumentCollection
DocumentCollection. apply(@NonNull SerializableFunction<HString,HString> function)
default DocumentCollection
DocumentCollection. apply(@NonNull SerializableFunction<HString,HString> function)
default DocumentCollection
DocumentCollection. apply(@NonNull Lexicon lexicon, @NonNull SerializableConsumer<HString> onMatch)
Applies a lexicon to the corpus creating annotations of the given type for matches. -
Uses of HString in com.gengoai.hermes.en
Methods in com.gengoai.hermes.en with parameters of type HString Modifier and Type Method Description protected void
ENPOSTagger. onEstimate(HString sentence, Datum datum)
-
Uses of HString in com.gengoai.hermes.extraction
Methods in com.gengoai.hermes.extraction that return types with arguments of type HString Modifier and Type Method Description protected abstract Stream<HString>
MultiPhaseExtractor. createStream(HString hString)
Creates a stream of extractions from the given inputprotected Stream<HString>
NGramExtractor. createStream(HString hString)
protected Stream<HString>
TermExtractor. createStream(HString hString)
Methods in com.gengoai.hermes.extraction with parameters of type HString Modifier and Type Method Description List<Variable>
MultiPhaseExtractor. applyAsFeatures(@NonNull HString input)
protected abstract Stream<HString>
MultiPhaseExtractor. createStream(HString hString)
Creates a stream of extractions from the given inputprotected Stream<HString>
NGramExtractor. createStream(HString hString)
protected Stream<HString>
TermExtractor. createStream(HString hString)
Extraction
Extractor. extract(@NonNull HString hString)
Generate anExtraction
from the givenHString
.Extraction
MultiPhaseExtractor. extract(@NonNull HString hString)
Extraction
RegexExtractor. extract(@NonNull HString hString)
Extraction
SearchExtractor. extract(@NonNull HString hString)
List<Tuple>
NGramExtractor. extractStringTuples(@NonNull HString hString)
Extracts NGrams as a List of String tuples.Method parameters in com.gengoai.hermes.extraction with type arguments of type HString Modifier and Type Method Description static Extraction
Extraction. fromHStringList(@NonNull List<HString> list)
Generates an HString-backed extraction which will use theHString.toString
for mapping to Strings and will return raw counts for counter based methods.static Extraction
Extraction. fromHStringList(@NonNull List<HString> list, @NonNull SerializableFunction<HString,String> toString)
Generates an HString-backed extraction with a provided function for converting the HString into string representations.static Extraction
Extraction. fromHStringList(@NonNull List<HString> list, @NonNull SerializableFunction<HString,String> toString)
Generates an HString-backed extraction with a provided function for converting the HString into string representations.static Extraction
Extraction. fromHStringList(@NonNull List<HString> list, @NonNull SerializableFunction<HString,String> toString, ValueCalculator calculator)
Generates an HString-backed extraction with a provided function for converting the HString into string representations.static Extraction
Extraction. fromHStringList(@NonNull List<HString> list, @NonNull SerializableFunction<HString,String> toString, ValueCalculator calculator)
Generates an HString-backed extraction with a provided function for converting the HString into string representations. -
Uses of HString in com.gengoai.hermes.extraction.caduceus
Methods in com.gengoai.hermes.extraction.caduceus with parameters of type HString Modifier and Type Method Description Extraction
CaduceusProgram. extract(@NonNull HString hString)
-
Uses of HString in com.gengoai.hermes.extraction.keyword
Methods in com.gengoai.hermes.extraction.keyword with parameters of type HString Modifier and Type Method Description Extraction
NPClusteringKeywordExtractor. extract(@NonNull HString source)
Extraction
RakeKeywordExtractor. extract(@NonNull HString source)
Extraction
TermKeywordExtractor. extract(@NonNull HString hString)
Extraction
TextRank. extract(@NonNull HString hString)
Extraction
TFIDFKeywordExtractor. extract(HString source)
-
Uses of HString in com.gengoai.hermes.extraction.lyre
Methods in com.gengoai.hermes.extraction.lyre that return HString Modifier and Type Method Description HString
LyreExpression. applyAsHString(HString string)
Applies this expression to the given HString converting the result into an HStringMethods in com.gengoai.hermes.extraction.lyre with parameters of type HString Modifier and Type Method Description String
LyreExpression. apply(HString hString)
double
LyreExpression. applyAsDouble(HString hString)
Applies this expression to the given object converting it to a doubleList<Variable>
LyreExpression. applyAsFeatures(HString hString)
HString
LyreExpression. applyAsHString(HString string)
Applies this expression to the given HString converting the result into an HStringCounter<String>
LyreExpression. count(@NonNull HString hString)
Applies the expression returning a count over the string results.Extraction
LyreExpression. extract(@NonNull HString hString)
boolean
LyreExpression. test(HString hString)
-
Uses of HString in com.gengoai.hermes.extraction.regex
Methods in com.gengoai.hermes.extraction.regex that return HString Modifier and Type Method Description HString
TokenMatch. group()
HString
TokenMatcher. group()
Methods in com.gengoai.hermes.extraction.regex that return types with arguments of type HString Modifier and Type Method Description List<HString>
TokenMatch. group(String groupName)
Gets the list of HString associated with a named group.List<HString>
TokenMatcher. group(String groupName)
Gets the list of HString associated with a named group.Optional<HString>
TokenRegex. matchFirst(HString text)
Runs the pattern over the given input text returning the first match if one exists.Methods in com.gengoai.hermes.extraction.regex with parameters of type HString Modifier and Type Method Description Extraction
TokenRegex. extract(@NonNull HString hString)
TokenMatcher
TokenRegex. matcher(HString text)
Creates aTokenMatcher
to match against the given text.TokenMatcher
TokenRegex. matcher(HString text, int start)
Creates aTokenMatcher
to match against the given text.int
BackreferenceTransition. matches(HString input, ListMultimap<String,HString> namedGroups)
TokenMatch
NFA. matches(HString input, int startIndex)
Matches theboolean
TokenRegex. matches(HString text)
Determines if the regex matches the entire region of the given input text.Optional<HString>
TokenRegex. matchFirst(HString text)
Runs the pattern over the given input text returning the first match if one exists.int
BackreferenceTransition. nonMatches(HString input, ListMultimap<String,HString> namedGroups)
Method parameters in com.gengoai.hermes.extraction.regex with type arguments of type HString Modifier and Type Method Description int
BackreferenceTransition. matches(HString input, ListMultimap<String,HString> namedGroups)
int
BackreferenceTransition. nonMatches(HString input, ListMultimap<String,HString> namedGroups)
-
Uses of HString in com.gengoai.hermes.extraction.summarization
Methods in com.gengoai.hermes.extraction.summarization with parameters of type HString Modifier and Type Method Description Extraction
TextRankSummarizer. extract(@NonNull HString hString)
-
Uses of HString in com.gengoai.hermes.format
Methods in com.gengoai.hermes.format with parameters of type HString Modifier and Type Method Description String
CoNLLColumnProcessor. processOutput(HString document, Annotation token, int index)
Generates output data in CoNLL format -
Uses of HString in com.gengoai.hermes.format.conll
Methods in com.gengoai.hermes.format.conll with parameters of type HString 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 HString in com.gengoai.hermes.lexicon
Methods in com.gengoai.hermes.lexicon with parameters of type HString Modifier and Type Method Description default boolean
WordList. contains(@NonNull HString string)
Is theHString
contained in the WordListExtraction
Lexicon. extract(@NonNull HString source)
double
Lexicon. getProbability(@NonNull HString hString)
Gets the maximum probability for matching the givenHString
double
Lexicon. getProbability(@NonNull HString hString, @NonNull Tag tag)
Gets the maximum probability for matching the givenHString
with the given TagOptional<String>
Lexicon. getTag(@NonNull HString hString)
Gets the first matched tag, if one, for the givenHString
boolean
DiskLexicon. isPrefixMatch(@NonNull HString hString)
boolean
PrefixSearchable. isPrefixMatch(HString hString)
Check if a prefix matches the givenHString
boolean
TrieLexicon. isPrefixMatch(HString hString)
boolean
TrieWordList. isPrefixMatch(HString hString)
List<LexiconEntry>
DiskLexicon. match(@NonNull HString string)
abstract List<LexiconEntry>
Lexicon. match(@NonNull HString string)
Gets the matched entries for a givenHString
List<LexiconEntry>
TrieLexicon. match(HString string)
boolean
Lexicon. test(@NonNull HString hString)
Constructors in com.gengoai.hermes.lexicon with parameters of type HString Constructor Description LexiconMatch(@NonNull HString span, double score, @NonNull String matchedString, String tag)
Instantiates a new Lexicon match.LexiconMatch(@NonNull HString span, @NonNull LexiconEntry entry)
Instantiates a new Lexicon match. -
Uses of HString in com.gengoai.hermes.ml
Methods in com.gengoai.hermes.ml that return HString Modifier and Type Method Description HString
BaseHStringMLModel. apply(@NonNull HString hString)
HString
ElmoTokenEmbedding. apply(@NonNull HString hString)
HString
IOBTagger. apply(@NonNull HString hString)
HString
TensorFlowSequenceLabeler. apply(HString hString)
HString
UniversalSentenceEncoder. apply(@NonNull HString hString)
default HString
ContextualizedEmbedding. transform(@NonNull HString hString, @NonNull AnnotationType annotationType)
default HString
HStringMLModel. transform(@NonNull HString hString)
Methods in com.gengoai.hermes.ml that return types with arguments of type HString Modifier and Type Method Description static ObservationExtractor<HString>
IOB. encoder(@NonNull AnnotationType annotationType)
static ObservationExtractor<HString>
IOB. encoder(@NonNull AnnotationType annotationType, @NonNull Set<String> validTags)
Methods in com.gengoai.hermes.ml with parameters of type HString Modifier and Type Method Description HString
BaseHStringMLModel. apply(@NonNull HString hString)
HString
ElmoTokenEmbedding. apply(@NonNull HString hString)
HString
IOBTagger. apply(@NonNull HString hString)
HString
TensorFlowSequenceLabeler. apply(HString hString)
HString
UniversalSentenceEncoder. apply(@NonNull HString hString)
static void
IOB. decode(@NonNull HString sentence, @NonNull Sequence<?> result, @NonNull AnnotationType annotationType)
void
TagDecoder. decode(@NonNull HString sentence, @NonNull Sequence<?> result)
protected abstract void
BaseHStringMLModel. onEstimate(HString hString, Datum datum)
On estimate.protected void
IOBTagger. onEstimate(HString sentence, Datum datum)
protected void
POSTagger. onEstimate(HString sentence, Datum result)
default HString
ContextualizedEmbedding. transform(@NonNull HString hString, @NonNull AnnotationType annotationType)
default HString
HStringMLModel. transform(@NonNull HString hString)
Method parameters in com.gengoai.hermes.ml with type arguments of type HString Modifier and Type Method Description HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultInput(@NonNull ObservationExtractor<? super HString> extractor)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultInput(@NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultInput(@NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultInput(@NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultOutput(@NonNull ObservationExtractor<? super HString> extractor)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultOutput(@NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultOutput(@NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. defaultOutput(@NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
DataSet
HStringDataSetGenerator. generate(@NonNull MStream<? extends HString> data)
DataSet
HStringDataSetGenerator. generate(@NonNull Collection<? extends HString> data)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. source(@NonNull String name, @NonNull ObservationExtractor<? super HString> extractor)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. source(@NonNull String name, @NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. source(@NonNull String name, @NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. source(@NonNull String name, @NonNull ObservationExtractor<? super HString> extractor, @NonNull SerializableFunction<? super HString,List<? extends HString>> toSequence)
HStringDataSetGenerator.Builder
HStringDataSetGenerator.Builder. tokenSequence(@NonNull String name, @NonNull ObservationExtractor<? super HString> extractor)
Creates a Sequence Observation where the sequence is defined over token-based Observations. -
Uses of HString in com.gengoai.hermes.ml.feature
Methods in com.gengoai.hermes.ml.feature that return types with arguments of type HString Modifier and Type Method Description static Featurizer<HString>
PredefinedFeatures. get(String name)
Get featurizer.Methods in com.gengoai.hermes.ml.feature with parameters of type HString Modifier and Type Method Description List<Variable>
AffixFeaturizer. applyAsFeatures(HString word)
List<Variable>
BasicCategoryFeature. applyAsFeatures(HString input)
List<Variable>
PredefinedFeatures.PredefinedFeaturizer. applyAsFeatures(HString input)
static boolean
LexicalFeatures. isCardinalNumber(@NonNull HString word)
static boolean
LexicalFeatures. isDigit(HString word)
static boolean
LexicalFeatures. isOrdinalNumber(@NonNull HString word)
static boolean
LexicalFeatures. isPercent(@NonNull HString word)
static String
LexicalFeatures. shape(@NonNull HString string)
static String
LexicalFeatures. wordClass(@NonNull HString string)
Method parameters in com.gengoai.hermes.ml.feature with type arguments of type HString Modifier and Type Method Description static PredefinedFeatures.PredefinedFeaturizer
PredefinedFeatures. predefinedFeature(String name, @NonNull Featurizer<HString> featurizer)
Predefined feature predefined featurizer.static PredefinedFeatures.PredefinedFeaturizer
PredefinedFeatures. predefinedPredicateFeature(String name, @NonNull SerializablePredicate<? super HString> featurizer)
Predefined predicate feature predefined featurizer.static PredefinedFeatures.PredefinedFeaturizer
PredefinedFeatures. predefinedValueFeature(String name, @NonNull SerializableFunction<? super HString,String> featurizer)
Predefined value feature predefined featurizer. -
Uses of HString in com.gengoai.hermes.morphology
Methods in com.gengoai.hermes.morphology that return types with arguments of type HString Modifier and Type Method Description static SerializablePredicate<HString>
StopWords. hasOnlyContentWords()
static SerializablePredicate<HString>
StopWords. hasStopWord()
static SerializablePredicate<HString>
StopWords. isContentWord()
static SerializablePredicate<HString>
StopWords. isStopWord()
Methods in com.gengoai.hermes.morphology with parameters of type HString Modifier and Type Method Description static PartOfSpeech
PartOfSpeech. forText(@NonNull HString text)
Determines the best fundamental POS (NOUN, VERB, ADJECTIVE, or ADVERB) for a text.boolean
StopWords. hasStopWord(HString text)
Returns true when any token in a given HString is a stopwordboolean
StopWords. isStopWord(HString text)
Checks if the given text is a stopworddefault String
Lemmatizer. lemmatize(@NonNull HString fragment)
Lemmatizes a token.default String
Stemmer. stem(@NonNull HString text)
Stems the given text object. -
Uses of HString in com.gengoai.hermes.similarity
Methods in com.gengoai.hermes.similarity with parameters of type HString Modifier and Type Method Description double
EmbeddingSimilarity. calculate(@NonNull HString first, @NonNull HString second)
double
ExtractorBasedSimilarity. calculate(@NonNull HString first, @NonNull HString second)
double
HStringSimilarity. calculate(@NonNull HString first, @NonNull HString second)
Calculates the similarity between the two givenHString
-