Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- add(String, long) - Method in class opennlp.spellcheck.symspell.SymSpell
-
Adds (or accumulates) a dictionary term and its count, updating the deletes index.
- addBigram(String, String, long) - Method in class opennlp.spellcheck.symspell.SymSpell
-
Adds (or accumulates) a bigram and its count for compound correction.
- ALL - Enum constant in enum class opennlp.spellcheck.Verbosity
-
Returns every suggestion within the requested maximum edit distance, ordered by ascending edit distance and then descending frequency.
- artifactId(String) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
B
- bigramCount() - Method in class opennlp.spellcheck.symspell.SymSpell
- bigrams() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
- Binary layout (big-endian, DataOutputStream) - Search tag in class opennlp.spellcheck.dictionary.SymSpellModelSerializer
- Section
- build() - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder
- build() - Method in class opennlp.spellcheck.symspell.SymSpellConfig.Builder
- builder() - Static method in class opennlp.spellcheck.symspell.SymSpellConfig
- builder(SymSpellModel) - Static method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
- builder(SpellChecker) - Static method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
- buildModel(String, SymSpellConfig, Charset, InputStreamFactory, InputStreamFactory) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Builds a
SymSpellModelfrom a unigram dictionary and an optional bigram dictionary using the supplied configuration. - buildProperties(SymSpellModel, byte[]) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Builds the
model.propertiesdescriptor for a serialized model, computing themodel.sha256over the supplied binary form.
C
- CLI - Class in opennlp.spellcheck.cmdline
-
The command line dispatcher for the OpenNLP SpellChecker (SymSpell) tools.
- CLOSEST - Enum constant in enum class opennlp.spellcheck.Verbosity
-
Returns all suggestions that share the smallest edit distance found, ordered by descending frequency.
- compareTo(SuggestItem) - Method in record class opennlp.spellcheck.SuggestItem
- COMPOUND - Enum constant in enum class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Mode
-
Correct the whole input as a phrase, repairing space splits/merges.
- corpusWordCount() - Method in class opennlp.spellcheck.symspell.SymSpellConfig
- corpusWordCount(long) - Method in class opennlp.spellcheck.symspell.SymSpellConfig.Builder
-
Pins the corpus normalization constant N used by the Naive-Bayes word combine/split scoring in
SymSpell.lookupCompound(String, int). - CorrectTextTool - Class in opennlp.spellcheck.cmdline
-
A command line tool that corrects spelling in text using a
SymSpellModel. - CorrectTextTool() - Constructor for class opennlp.spellcheck.cmdline.CorrectTextTool
- countThreshold() - Method in class opennlp.spellcheck.symspell.SymSpellConfig
- countThreshold(long) - Method in class opennlp.spellcheck.symspell.SymSpellConfig.Builder
- create(InputStream) - Method in class opennlp.spellcheck.dictionary.SymSpellModelSerializer
D
- DamerauOSADistance - Class in opennlp.spellcheck.distance
-
Optimal String Alignment (restricted Damerau-Levenshtein) edit distance.
- DamerauOSADistance() - Constructor for class opennlp.spellcheck.distance.DamerauOSADistance
- DEFAULT_CHARSET - Static variable in class opennlp.spellcheck.dictionary.FrequencyDictionaryLoader
-
The default character set used when none is supplied.
- DEFAULT_DELIMITER - Static variable in class opennlp.spellcheck.stream.SpellCorrectingTokenStream
-
The default delimiter splitting and re-joining tokens (a single space).
- DEFAULT_MIN_TOKEN_LENGTH - Static variable in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
-
The default minimum token length below which tokens are left untouched.
- DEFAULT_MODEL_NAME - Static variable in class opennlp.spellcheck.dictionary.SymSpellModel
-
The default model name fragment used for classpath discovery.
- DEFAULT_MODEL_VERSION - Static variable in class opennlp.spellcheck.dictionary.SymSpellModel
-
The default model version used when none is supplied.
- DEFAULT_NAME_FRAGMENT - Static variable in class opennlp.spellcheck.dictionary.SymSpellModelResolver
-
Default
model.namefragment used to recognize spellcheck models. - defaultConfig() - Static method in class opennlp.spellcheck.symspell.SymSpellConfig
- DERIVE_CORPUS_WORD_COUNT - Static variable in class opennlp.spellcheck.symspell.SymSpellConfig
-
Sentinel for
SymSpellConfig.corpusWordCount()meaning "derive N from the summed counts of the loaded dictionary" rather than pinning it to a fixed value. - deserialize(InputStream) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Deserializes a model from the given stream using
SymSpellModelSerializer. - distance(CharSequence, CharSequence, int) - Method in class opennlp.spellcheck.distance.DamerauOSADistance
- distance(CharSequence, CharSequence, int) - Method in interface opennlp.spellcheck.distance.EditDistance
-
Computes the edit distance between
aandb, giving up early once it is certain the distance exceedsmax. - distance(CharSequence, CharSequence, int) - Method in class opennlp.spellcheck.distance.LevenshteinDistance
E
- EDIT_DISTANCE_DAMERAU_OSA - Static variable in class opennlp.spellcheck.dictionary.SymSpellModelSerializer
-
Stable identifier for
DamerauOSADistance. - EDIT_DISTANCE_LEVENSHTEIN - Static variable in class opennlp.spellcheck.dictionary.SymSpellModelSerializer
-
Stable identifier for
LevenshteinDistance. - editDistance() - Method in record class opennlp.spellcheck.SuggestItem
-
Returns the value of the
editDistancerecord component. - editDistance() - Method in class opennlp.spellcheck.symspell.SymSpellConfig
- editDistance(EditDistance) - Method in class opennlp.spellcheck.symspell.SymSpellConfig.Builder
- EditDistance - Interface in opennlp.spellcheck.distance
-
Computes the edit distance between two character sequences with an upper bound.
- entryCount() - Method in class opennlp.spellcheck.symspell.SymSpell
- equals(Object) - Method in record class opennlp.spellcheck.SuggestItem
-
Indicates whether some other object is "equal to" this one.
F
- frequency() - Method in record class opennlp.spellcheck.SuggestItem
-
Returns the value of the
frequencyrecord component. - FrequencyDictionaryLoader - Class in opennlp.spellcheck.dictionary
-
Loads plain-text frequency dictionaries into a
SymSpellengine. - FrequencyDictionaryLoader() - Constructor for class opennlp.spellcheck.dictionary.FrequencyDictionaryLoader
-
Creates a loader using the default UTF-8 charset.
- FrequencyDictionaryLoader(Charset) - Constructor for class opennlp.spellcheck.dictionary.FrequencyDictionaryLoader
-
Creates a loader using the supplied charset.
- fromBytes(byte[]) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Deserializes a model from a byte array.
G
- getArtifactSerializerClass() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
- getConfig() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
- getHelp() - Method in class opennlp.spellcheck.cmdline.CorrectTextTool
- getHelp() - Method in class opennlp.spellcheck.cmdline.SpellCheckModelBuilderTool
- getLanguage() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
- getLineNumber() - Method in exception class opennlp.spellcheck.dictionary.MalformedDictionaryLineException
- getName() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
- getShortDescription() - Method in class opennlp.spellcheck.cmdline.CorrectTextTool
- getShortDescription() - Method in class opennlp.spellcheck.cmdline.SpellCheckModelBuilderTool
- getSymSpell() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
- getToolNames() - Static method in class opennlp.spellcheck.cmdline.CLI
- getVersion() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
H
- hashCode() - Method in record class opennlp.spellcheck.SuggestItem
-
Returns a hash code value for this object.
I
- INSTANCE - Static variable in class opennlp.spellcheck.distance.DamerauOSADistance
-
Shared, stateless instance.
- INSTANCE - Static variable in class opennlp.spellcheck.distance.LevenshteinDistance
-
Shared, stateless instance.
L
- LevenshteinDistance - Class in opennlp.spellcheck.distance
-
Plain Levenshtein edit distance (insertions, deletions, substitutions; no transpositions).
- LevenshteinDistance() - Constructor for class opennlp.spellcheck.distance.LevenshteinDistance
- loadBigrams(SymSpell, InputStreamFactory) - Method in class opennlp.spellcheck.dictionary.FrequencyDictionaryLoader
-
Loads a bigram frequency dictionary (
w1<sep>w2<sep>count) intotarget. - loadUnigrams(SymSpell, InputStreamFactory) - Method in class opennlp.spellcheck.dictionary.FrequencyDictionaryLoader
-
Loads a unigram frequency dictionary (
word<sep>count) intotarget. - lookup(String) - Method in interface opennlp.spellcheck.SpellChecker
-
Convenience overload that uses
TOPand the implementation's configured maximum dictionary edit distance. - lookup(String) - Method in class opennlp.spellcheck.symspell.SymSpell
- lookup(String, Verbosity, int) - Method in interface opennlp.spellcheck.SpellChecker
-
Looks up suggestions for a single
termwithinmaxEditDistance. - lookup(String, Verbosity, int) - Method in class opennlp.spellcheck.symspell.SymSpell
- lookupCompound(String, int) - Method in interface opennlp.spellcheck.SpellChecker
-
Corrects a whole input string (a phrase or sentence), supporting word splits and merges, and combining candidates using a bigram language model.
- lookupCompound(String, int) - Method in class opennlp.spellcheck.symspell.SymSpell
M
- main(String[]) - Static method in class opennlp.spellcheck.cmdline.CLI
- MalformedDictionaryLineException - Exception Class in opennlp.spellcheck.dictionary
-
Signals that a line in a plain-text frequency dictionary did not match the expected
word<TAB>count(orw1 w2<TAB>count) shape and could not be parsed. - MalformedDictionaryLineException(long, String, String) - Constructor for exception class opennlp.spellcheck.dictionary.MalformedDictionaryLineException
-
Creates a new exception.
- maxDictionaryEditDistance() - Method in class opennlp.spellcheck.symspell.SymSpellConfig
- maxDictionaryEditDistance(int) - Method in class opennlp.spellcheck.symspell.SymSpellConfig.Builder
- maxEditDistance() - Method in interface opennlp.spellcheck.SpellChecker
- maxEditDistance() - Method in class opennlp.spellcheck.symspell.SymSpell
- maxEditDistance(int) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder
- minTokenLength(int) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder
- mode(SpellCheckingCharSequenceNormalizer.Mode) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder
- MODEL_ARTIFACT_PREFIX - Static variable in class opennlp.spellcheck.dictionary.SymSpellModels
-
The Maven artifactId pattern for packaged spellcheck model jars.
N
- normalize(CharSequence) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
O
- opennlp.spellcheck - package opennlp.spellcheck
- opennlp.spellcheck.cmdline - package opennlp.spellcheck.cmdline
- opennlp.spellcheck.dictionary - package opennlp.spellcheck.dictionary
- opennlp.spellcheck.distance - package opennlp.spellcheck.distance
- opennlp.spellcheck.normalizer - package opennlp.spellcheck.normalizer
- opennlp.spellcheck.stream - package opennlp.spellcheck.stream
- opennlp.spellcheck.symspell - package opennlp.spellcheck.symspell
P
- PER_TOKEN - Enum constant in enum class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Mode
-
Correct each whitespace-delimited token independently.
- prefixLength() - Method in class opennlp.spellcheck.symspell.SymSpellConfig
- prefixLength(int) - Method in class opennlp.spellcheck.symspell.SymSpellConfig.Builder
- PROP_LANGUAGE - Static variable in class opennlp.spellcheck.dictionary.SymSpellModels
-
Property key for the model language tag.
- PROP_NAME - Static variable in class opennlp.spellcheck.dictionary.SymSpellModels
-
Property key for the model name.
- PROP_SHA256 - Static variable in class opennlp.spellcheck.dictionary.SymSpellModels
-
Property key for the SHA-256 of the binary model.
- PROP_VERSION - Static variable in class opennlp.spellcheck.dictionary.SymSpellModels
-
Property key for the model version.
R
- read() - Method in class opennlp.spellcheck.stream.SpellCorrectingObjectStream
- read() - Method in class opennlp.spellcheck.stream.SpellCorrectingTokenStream
- resolveByLanguage(String) - Method in class opennlp.spellcheck.dictionary.SymSpellModelResolver
-
Resolves a spellcheck model for the given language from the current classpath.
- resolveByLanguage(String, boolean) - Method in class opennlp.spellcheck.dictionary.SymSpellModelResolver
-
Resolves a spellcheck model for the given language from the current classpath.
- run(String[]) - Method in class opennlp.spellcheck.cmdline.CorrectTextTool
- run(String[]) - Method in class opennlp.spellcheck.cmdline.SpellCheckModelBuilderTool
S
- serialize(SymSpellModel, OutputStream) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Serializes a model to the given stream using
SymSpellModelSerializer. - serialize(SymSpellModel, OutputStream) - Method in class opennlp.spellcheck.dictionary.SymSpellModelSerializer
- skipNumbers(boolean) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder
- skipUrls(boolean) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Builder
- SpellChecker - Interface in opennlp.spellcheck
-
A spelling corrector that proposes
suggestionsfor individual terms and corrects whole sentences. - SpellCheckingCharSequenceNormalizer - Class in opennlp.spellcheck.normalizer
-
A
CharSequenceNormalizerthat corrects spelling in text using aSpellChecker(typically a SymSpell engine). - SpellCheckingCharSequenceNormalizer(SymSpellModel) - Constructor for class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
-
Creates a normalizer in
SpellCheckingCharSequenceNormalizer.Mode.PER_TOKENmode with default guards from a loadedSymSpellModel(uses the model'sengine). - SpellCheckingCharSequenceNormalizer(SpellChecker) - Constructor for class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
-
Creates a normalizer in
SpellCheckingCharSequenceNormalizer.Mode.PER_TOKENmode with default guards from aSpellChecker. - SpellCheckingCharSequenceNormalizer.Builder - Class in opennlp.spellcheck.normalizer
-
A mutable builder for
SpellCheckingCharSequenceNormalizer. - SpellCheckingCharSequenceNormalizer.Mode - Enum Class in opennlp.spellcheck.normalizer
-
The correction mode.
- SpellCheckModelBuilderTool - Class in opennlp.spellcheck.cmdline
-
A command line tool that builds a binary
SymSpellModelfrom plain-text frequency dictionaries. - SpellCheckModelBuilderTool() - Constructor for class opennlp.spellcheck.cmdline.SpellCheckModelBuilderTool
- SpellCorrectingObjectStream - Class in opennlp.spellcheck.stream
-
A
FilterObjectStreamthat spell-corrects eachStringline read from a wrappedObjectStream(for example aPlainTextByLineStream). - SpellCorrectingObjectStream(ObjectStream<String>, SymSpellModel) - Constructor for class opennlp.spellcheck.stream.SpellCorrectingObjectStream
-
Wraps
sampleswith a default per-token corrector backed by a loadedSymSpellModel. - SpellCorrectingObjectStream(ObjectStream<String>, SpellCheckingCharSequenceNormalizer) - Constructor for class opennlp.spellcheck.stream.SpellCorrectingObjectStream
-
Wraps
sampleswith an explicitly configured corrector, so callers can pick the mode and guards throughSpellCheckingCharSequenceNormalizer.Builder. - SpellCorrectingObjectStream(ObjectStream<String>, SpellChecker) - Constructor for class opennlp.spellcheck.stream.SpellCorrectingObjectStream
-
Wraps
sampleswith a default per-token corrector backed by aSpellChecker. - SpellCorrectingTokenStream - Class in opennlp.spellcheck.stream
-
A
FilterObjectStreamfor tokenized data: each element read from the wrappedObjectStreamis a string of tokens separated by a known delimiter (whitespace by default). - SpellCorrectingTokenStream(ObjectStream<String>, SymSpellModel) - Constructor for class opennlp.spellcheck.stream.SpellCorrectingTokenStream
- SpellCorrectingTokenStream(ObjectStream<String>, SpellCheckingCharSequenceNormalizer, String) - Constructor for class opennlp.spellcheck.stream.SpellCorrectingTokenStream
-
Wraps
sampleswith an explicitly configured corrector and delimiter. - SpellCorrectingTokenStream(ObjectStream<String>, SpellChecker) - Constructor for class opennlp.spellcheck.stream.SpellCorrectingTokenStream
- SuggestItem - Record Class in opennlp.spellcheck
-
An immutable spelling suggestion produced by a
SpellChecker. - SuggestItem(String, int, long) - Constructor for record class opennlp.spellcheck.SuggestItem
-
Creates an instance of a
SuggestItemrecord class. - SymSpell - Class in opennlp.spellcheck.symspell
-
Symmetric Delete spelling correction engine (SymSpell).
- SymSpell() - Constructor for class opennlp.spellcheck.symspell.SymSpell
-
Creates an engine with the default config.
- SymSpell(SymSpellConfig) - Constructor for class opennlp.spellcheck.symspell.SymSpell
-
Creates an engine from the given configuration.
- SymSpellConfig - Class in opennlp.spellcheck.symspell
-
Immutable configuration for
SymSpell, created throughSymSpellConfig.builder(). - SymSpellConfig.Builder - Class in opennlp.spellcheck.symspell
-
Mutable builder for
SymSpellConfig. - SymSpellModel - Class in opennlp.spellcheck.dictionary
-
A serializable spell-correction model: a built
SymSpellengine together with the source frequency data and the metadata needed to reproduce and identify it. - SymSpellModel(String, String, String, SymSpellConfig, Map<String, Long>, Map<String, Long>) - Constructor for class opennlp.spellcheck.dictionary.SymSpellModel
-
Creates a model with explicit name and version, and builds its
SymSpellengine from the supplied source data. - SymSpellModel(String, SymSpellConfig, Map<String, Long>, Map<String, Long>) - Constructor for class opennlp.spellcheck.dictionary.SymSpellModel
-
Creates a model and builds its
SymSpellengine from the supplied source data. - SymSpellModelResolver - Class in opennlp.spellcheck.dictionary
-
Resolves packaged
SymSpell modelsfrom the classpath by language. - SymSpellModelResolver() - Constructor for class opennlp.spellcheck.dictionary.SymSpellModelResolver
-
Creates a resolver that scans the default
opennlp-models-*.jarprefix using aSimpleClassPathModelFinderand recognizes spellcheck models by the default name fragment. - SymSpellModelResolver(ClassPathModelFinder, ClassPathModelLoader, String) - Constructor for class opennlp.spellcheck.dictionary.SymSpellModelResolver
-
Creates a resolver with explicit collaborators.
- SymSpellModels - Class in opennlp.spellcheck.dictionary
-
Convenience factory and (de)serialization helpers for
SymSpellModel. - SymSpellModelSerializer - Class in opennlp.spellcheck.dictionary
-
Binary
ArtifactSerializerforSymSpellModel. - SymSpellModelSerializer() - Constructor for class opennlp.spellcheck.dictionary.SymSpellModelSerializer
-
Public no-arg constructor required by the
ArtifactSerializercontract.
T
- term() - Method in record class opennlp.spellcheck.SuggestItem
-
Returns the value of the
termrecord component. - toBytes(SymSpellModel) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Serializes a model to a byte array.
- TOP - Enum constant in enum class opennlp.spellcheck.Verbosity
-
Returns the single suggestion with the smallest edit distance; ties are broken by the highest term frequency.
- toString() - Method in record class opennlp.spellcheck.SuggestItem
-
Returns a string representation of this record class.
U
- unigrams() - Method in class opennlp.spellcheck.dictionary.SymSpellModel
V
- valueOf(String) - Static method in enum class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Mode
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class opennlp.spellcheck.Verbosity
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer.Mode
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class opennlp.spellcheck.Verbosity
-
Returns an array containing the constants of this enum class, in the order they are declared.
- Verbosity - Enum Class in opennlp.spellcheck
-
Controls how many suggestions a
SpellChecker.lookup(java.lang.String, opennlp.spellcheck.Verbosity, int)call returns and with how much effort they are gathered.
W
- What is serialized, and why - Search tag in class opennlp.spellcheck.dictionary.SymSpellModelSerializer
- Section
- withSpellChecker(SpellChecker) - Method in class opennlp.spellcheck.normalizer.SpellCheckingCharSequenceNormalizer
-
Returns a copy of this normalizer carrying the same settings but backed by the given checker.
- wordCount() - Method in class opennlp.spellcheck.symspell.SymSpell
- writePackage(SymSpellModel, OutputStream, OutputStream) - Static method in class opennlp.spellcheck.dictionary.SymSpellModels
-
Writes a packaged model pair to the given streams: the binary model and the matching
model.properties.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form