Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- AbstractDL - Class in opennlp.dl
-
Base class for OpenNLP deep-learning classes using ONNX Runtime.
- ATTENTION_MASK - Static variable in class opennlp.dl.AbstractDL
- AUTO - Enum constant in enum class opennlp.dl.vectors.PaddingStrategy
-
Selects
PaddingStrategy.LONGESTon a GPU for a model with token output and a padding token in its vocabulary,PaddingStrategy.EXACT_LENGTHotherwise. - AverageClassificationScoringStrategy - Class in opennlp.dl.doccat.scoring
-
A
ClassificationScoringStrategywhich calculates the document classification scores by averaging the scores for all individual parts of a document. - AverageClassificationScoringStrategy() - Constructor for class opennlp.dl.doccat.scoring.AverageClassificationScoringStrategy
C
- categorize(String[]) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
-
Categorizes the document, failing loudly rather than returning an invalid distribution: malformed input is rejected with
IllegalArgumentException, and any failure executing the model is surfaced as anIllegalStateException(cause preserved). - categorize(String[], Map) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- ClassificationScoringStrategy - Interface in opennlp.dl.doccat.scoring
-
Used to determine the scores of document classification.
- clearAdaptiveData() - Method in class opennlp.dl.namefinder.NameFinderDL
- close() - Method in class opennlp.dl.AbstractDL
-
Closes the ONNX
OrtSessionowned by this instance. - close() - Method in class opennlp.dl.vectors.SentenceVectorsDL
-
Closes the ONNX session.
- CLS - Enum constant in enum class opennlp.dl.vectors.Pooling
-
The vector of the first token,
[CLS]. - create(ProviderSpec) - Method in class opennlp.dl.vectors.OnnxTextEmbedderProvider
D
- DEFAULT_CPU_PADDING - Static variable in class opennlp.dl.vectors.SentenceVectorsDL
-
The
PaddingStrategyon the CPU, or on a GPU for a pooled output, if none is given. - DEFAULT_GPU_PADDING - Static variable in class opennlp.dl.vectors.SentenceVectorsDL
-
The
PaddingStrategyon a GPU if none is given and the model has no pooled output, so padding is masked out of the pooling, and the vocabulary has a padding token. - DEFAULT_MAX_LENGTH - Static variable in class opennlp.dl.vectors.SentenceVectorsDL
-
The maximum number of tokens per input if none is given, the BERT position limit.
- dimension() - Method in class opennlp.dl.vectors.SentenceVectorsDL
- DocumentCategorizerConfig - Record Class in opennlp.dl.doccat
-
The part of a model configuration that a
DocumentCategorizerDLuses: theid2labelmap of output index to label. - DocumentCategorizerConfig(Map) - Constructor for record class opennlp.dl.doccat.DocumentCategorizerConfig
-
Creates an instance of a
DocumentCategorizerConfigrecord class. - DocumentCategorizerDL - Class in opennlp.dl.doccat
-
An implementation of
DocumentCategorizerthat performs document classification using ONNX models. - DocumentCategorizerDL(File, File, File, ClassificationScoringStrategy, InferenceOptions) - Constructor for class opennlp.dl.doccat.DocumentCategorizerDL
-
Instantiates a
document categorizerusing ONNX models. - DocumentCategorizerDL(File, File, Map, ClassificationScoringStrategy, InferenceOptions) - Constructor for class opennlp.dl.doccat.DocumentCategorizerDL
-
Instantiates a
document categorizerusing ONNX models.
E
- embed(CharSequence) - Method in class opennlp.dl.vectors.SentenceVectorsDL
- embedAll(List) - Method in class opennlp.dl.vectors.SentenceVectorsDL
- equals(Object) - Method in record class opennlp.dl.doccat.DocumentCategorizerConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class opennlp.dl.Tokens
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Indicates whether some other object is "equal to" this one.
- EXACT_LENGTH - Enum constant in enum class opennlp.dl.vectors.PaddingStrategy
-
No padding.
F
- find(String[]) - Method in class opennlp.dl.namefinder.NameFinderDL
- findInOriginal(String[]) - Method in class opennlp.dl.namefinder.NameFinderDL
-
Finds names and returns their
spansin coordinates of the original joined input (String.join(" ", input)), regardless of any whitespace or dash normalization applied before inference. - fromJson(String) - Static method in record class opennlp.dl.doccat.DocumentCategorizerConfig
-
Reads the top-level
id2labelmember of a model configuration, the object that maps each output index to its label in theconfig.jsonfiles that accompany classification models.
G
- getAllResults(double[]) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- getBestCategory(double[]) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- getCategory(int) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- getDocumentSplitSize() - Method in class opennlp.dl.InferenceOptions
- getGpuDeviceId() - Method in class opennlp.dl.InferenceOptions
- getIndex(String) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- getLowerCase() - Method in class opennlp.dl.InferenceOptions
-
Returns whether tokenization should lower case the input text and strip accents, as required by uncased models.
- getNumberOfCategories() - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- getSplitOverlapSize() - Method in class opennlp.dl.InferenceOptions
- getVectors(String) - Method in class opennlp.dl.vectors.SentenceVectorsDL
-
Generates vectors given a sentence.
H
- hashCode() - Method in record class opennlp.dl.doccat.DocumentCategorizerConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class opennlp.dl.Tokens
-
Returns a hash code value for this object.
- hashCode() - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Returns a hash code value for this object.
I
- id2label() - Method in record class opennlp.dl.doccat.DocumentCategorizerConfig
-
Returns the value of the
id2labelrecord component. - ids() - Method in record class opennlp.dl.Tokens
-
Returns the value of the
idsrecord component. - InferenceOptions - Class in opennlp.dl
- InferenceOptions() - Constructor for class opennlp.dl.InferenceOptions
- INPUT_IDS - Static variable in class opennlp.dl.AbstractDL
- isAvailable() - Method in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
Checks that the ONNX Runtime classes are present without initializing the runtime.
- isGpu() - Method in class opennlp.dl.InferenceOptions
- isIncludeAttentionMask() - Method in class opennlp.dl.InferenceOptions
- isIncludeTokenTypeIds() - Method in class opennlp.dl.InferenceOptions
- isNormalizeDashes() - Method in class opennlp.dl.InferenceOptions
-
Returns whether input dashes are normalized to the ASCII hyphen before inference.
- isNormalizeWhitespace() - Method in class opennlp.dl.InferenceOptions
-
Returns whether input whitespace is normalized to ASCII spaces before inference.
J
- JsonScan - Class in opennlp.dl
-
Reads the JSON files of the deep-learning components, vocabularies and model configurations.
L
- loadVocab(File) - Method in class opennlp.dl.AbstractDL
-
Loads a vocabulary
Filefrom disk. - LONGEST - Enum constant in enum class opennlp.dl.vectors.PaddingStrategy
-
Every row of a batch is padded to the longest row of that batch.
- LOWER_CASE_OPTION - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
The option that lower-cases the text,
trueby default orfalse.
M
- mask() - Method in record class opennlp.dl.Tokens
-
Returns the value of the
maskrecord component. - MAX_LENGTH - Enum constant in enum class opennlp.dl.vectors.PaddingStrategy
-
Every row is padded to the maximum length, so every inference has the same sequence length.
- MAX_LENGTH_OPTION - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
The option that sets the maximum number of tokens per input, at least
2, 512 by default. - maxLength() - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Returns the value of the
maxLengthrecord component. - MEAN - Enum constant in enum class opennlp.dl.vectors.Pooling
-
The mean of the vectors of all tokens the attention mask marks as real.
N
- name() - Method in class opennlp.dl.vectors.OnnxTextEmbedderProvider
- NAME - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
The name of this provider.
- NameFinderDL - Class in opennlp.dl.namefinder
-
An implementation of
TokenNameFinderthat uses ONNX models. - NameFinderDL(File, File, Map, InferenceOptions, SentenceDetector) - Constructor for class opennlp.dl.namefinder.NameFinderDL
-
Instantiates a
name finderusing ONNX models. - NameFinderDL(File, File, Map, SentenceDetector) - Constructor for class opennlp.dl.namefinder.NameFinderDL
-
Instantiates a
name finderusing ONNX models. - NO_SPACE_AFTER_TOKENS - Static variable in class opennlp.dl.namefinder.NameFinderDL
-
Tokens after which the following token attaches directly when span text is reconstructed.
- NO_SPACE_BEFORE_TOKENS - Static variable in class opennlp.dl.namefinder.NameFinderDL
-
Tokens that attach directly to the preceding token when span text is reconstructed.
- normalize() - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Returns the value of the
normalizerecord component. - NORMALIZE_OPTION - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
The option that scales vectors to unit length,
trueby default orfalse.
O
- OnnxTextEmbedderProvider - Class in opennlp.dl.vectors
-
Provides a
SentenceVectorsDLunder the name "onnx". - OnnxTextEmbedderProvider() - Constructor for class opennlp.dl.vectors.OnnxTextEmbedderProvider
- opennlp.dl - package opennlp.dl
- opennlp.dl.doccat - package opennlp.dl.doccat
- opennlp.dl.doccat.scoring - package opennlp.dl.doccat.scoring
- opennlp.dl.namefinder - package opennlp.dl.namefinder
- opennlp.dl.vectors - package opennlp.dl.vectors
P
- padding() - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Returns the value of the
paddingrecord component. - PADDING_OPTION - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
The option that selects the
PaddingStrategy:autoby default,exact_length,longestormax_length, in any letter case. - PaddingStrategy - Enum Class in opennlp.dl.vectors
-
How
SentenceVectorsDL.embedAll(List)shapes the tensors of one inference when the texts of a call differ in tokenized length. - pooling() - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Returns the value of the
poolingrecord component. - Pooling - Enum Class in opennlp.dl.vectors
-
How
SentenceVectorsDLturns the token vectors of a model into one sentence vector. - POOLING_OPTION - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
- PREFIX_BEGIN - Static variable in class opennlp.dl.namefinder.NameFinderDL
-
Prefix used by BIO labels for the first token in an entity span.
- PREFIX_INSIDE - Static variable in class opennlp.dl.namefinder.NameFinderDL
-
Prefix used by BIO labels for continuation tokens in an entity span.
S
- score(List) - Method in class opennlp.dl.doccat.scoring.AverageClassificationScoringStrategy
- score(List) - Method in interface opennlp.dl.doccat.scoring.ClassificationScoringStrategy
-
Calculate the final scores based on the scores of the individual document parts.
- scoreMap(String[]) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- SentenceVectorsDL - Class in opennlp.dl.vectors
-
Facilitates the generation of sentence vectors using a sentence-transformers model converted to ONNX.
- SentenceVectorsDL(File, File) - Constructor for class opennlp.dl.vectors.SentenceVectorsDL
-
Instantiates a
sentence vector generatorfor an uncased model. - SentenceVectorsDL(File, File, boolean) - Constructor for class opennlp.dl.vectors.SentenceVectorsDL
-
Instantiates a
sentence vector generatorthat averages the token vectors, scales the result to unit length and truncates input to 512 tokens. - SentenceVectorsDL(File, File, boolean, Pooling, boolean, int) - Constructor for class opennlp.dl.vectors.SentenceVectorsDL
-
Instantiates a
sentence vector generatorusing ONNX models. - SentenceVectorsDL(File, File, boolean, SentenceVectorsOptions, InferenceOptions) - Constructor for class opennlp.dl.vectors.SentenceVectorsDL
-
Instantiates a sentence vector generator with vector settings and ONNX session settings.
- SentenceVectorsOptions - Record Class in opennlp.dl.vectors
-
Pooling, normalization, truncation and padding settings for
SentenceVectorsDL. - SentenceVectorsOptions() - Constructor for record class opennlp.dl.vectors.SentenceVectorsOptions
-
Creates settings for mean pooling, unit length scaling, a maximum of 512 tokens and the device and model padding default.
- SentenceVectorsOptions(Pooling, boolean, int, PaddingStrategy) - Constructor for record class opennlp.dl.vectors.SentenceVectorsOptions
-
Creates vector settings after validating the pooling mode, maximum length and padding strategy.
- setDocumentSplitSize(int) - Method in class opennlp.dl.InferenceOptions
- setGpu(boolean) - Method in class opennlp.dl.InferenceOptions
-
Selects GPU inference.
- setGpuDeviceId(int) - Method in class opennlp.dl.InferenceOptions
- setIncludeAttentionMask(boolean) - Method in class opennlp.dl.InferenceOptions
- setIncludeTokenTypeIds(boolean) - Method in class opennlp.dl.InferenceOptions
- setLowerCase(boolean) - Method in class opennlp.dl.InferenceOptions
-
Sets whether tokenization should lower case the input text and strip accents.
- setNormalizeDashes(boolean) - Method in class opennlp.dl.InferenceOptions
-
Replaces Unicode dashes in the input with the ASCII hyphen-minus before inference.
- setNormalizeWhitespace(boolean) - Method in class opennlp.dl.InferenceOptions
-
Replaces every Unicode whitespace character in the input with an ASCII space before inference.
- setSplitOverlapSize(int) - Method in class opennlp.dl.InferenceOptions
- sortedScoreMap(String[]) - Method in class opennlp.dl.doccat.DocumentCategorizerDL
- stringObject(String, String) - Static method in class opennlp.dl.JsonScan
-
Reads a top-level member whose value is an object of strings, such as the
id2labelmap of a model configuration. - supports(ProviderSpec) - Method in class opennlp.dl.vectors.OnnxTextEmbedderProvider
T
- TOKEN_TYPE_IDS - Static variable in class opennlp.dl.AbstractDL
- tokens() - Method in record class opennlp.dl.Tokens
-
Returns the value of the
tokensrecord component. - Tokens - Record Class in opennlp.dl
-
Holds the tokens for input to an ONNX model.
- Tokens(String[], long[], long[], long[]) - Constructor for record class opennlp.dl.Tokens
-
Creates an instance of a
Tokensrecord class. - toString() - Method in record class opennlp.dl.doccat.DocumentCategorizerConfig
-
Returns a string representation of this record class.
- toString() - Method in record class opennlp.dl.Tokens
-
Returns a string representation of this record class.
- toString() - Method in record class opennlp.dl.vectors.SentenceVectorsOptions
-
Returns a string representation of this record class.
- types() - Method in record class opennlp.dl.Tokens
-
Returns the value of the
typesrecord component.
V
- valueOf(String) - Static method in enum class opennlp.dl.vectors.PaddingStrategy
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class opennlp.dl.vectors.Pooling
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class opennlp.dl.vectors.PaddingStrategy
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class opennlp.dl.vectors.Pooling
-
Returns an array containing the constants of this enum class, in the order they are declared.
- VOCABULARY_OPTION - Static variable in class opennlp.dl.vectors.OnnxTextEmbedderProvider
-
The required option that names the vocabulary file, resolved against the directory of the model if it is relative.
All Classes and Interfaces|All Packages|Constant Field Values