Uses of Class
com.gengoai.hermes.lexicon.Lexicon
-
Packages that use Lexicon Package Description com.gengoai.hermes.annotator com.gengoai.hermes.corpus com.gengoai.hermes.lexicon -
-
Uses of Lexicon in com.gengoai.hermes.annotator
Constructors in com.gengoai.hermes.annotator with parameters of type Lexicon Constructor Description FuzzyLexiconAnnotator(@NonNull AnnotationType annotationType, @NonNull AttributeType<?> attributeType, @NonNull Lexicon lexicon, @NonNull Language lexiconLanguage, int maxDistance)
Instantiates a new FuzzyLexiconAnnotator.LexiconAnnotator(@NonNull AnnotationType type, @NonNull Lexicon lexicon)
Instantiates a new LexiconAnnotator. -
Uses of Lexicon in com.gengoai.hermes.corpus
Methods in com.gengoai.hermes.corpus with parameters of type Lexicon Modifier and Type Method Description default Corpus
Corpus. apply(Lexicon lexicon, SerializableConsumer<HString> onMatch)
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 Lexicon in com.gengoai.hermes.lexicon
Subclasses of Lexicon in com.gengoai.hermes.lexicon Modifier and Type Class Description class
DiskLexicon
APersistentLexicon
that storesLexiconEntry
on disk facilitating the use of very lexicons with little memory overhead.class
PersistentLexicon
Base class for lexicon implementations that are persistent, meaning added entries are persisted between runs.class
TrieLexicon
Implementation ofLexicon
usng a Trie data structure.Methods in com.gengoai.hermes.lexicon that return Lexicon Modifier and Type Method Description Lexicon
LexiconSpecification. create()
Create the lexicon from this specificationstatic Lexicon
LexiconManager. getLexicon(String name)
Gets the lexicon of the given name for the default language as defined inHermes.defaultLanguage()
.static Lexicon
LexiconManager. getLexicon(String name, @NonNull Language language)
Gets the lexicon with the given name for the given Languagestatic Lexicon
LexiconIO. importCSV(@NonNull Resource csvFile, @NonNull Consumer<LexiconIO.CSVParameters> updater)
Imports a CSV file into an in-memory lexicon.static Lexicon
LexiconIO. importCSV(@NonNull String name, @NonNull Resource csvFile, @NonNull Consumer<LexiconIO.CSVParameters> updater)
Imports a CSV file into an in-memory lexicon.protected static Lexicon
LexiconManager. loadLexicon(String name, Language language)
static Lexicon
LexiconIO. read(@NonNull Resource lexiconResource)
Reads a lexicon in Json format from the given lexicon resourcestatic Lexicon
LexiconIO. read(@NonNull String name, @NonNull Resource lexiconResource)
Reads a lexicon in Json format from the given lexicon resourceMethods in com.gengoai.hermes.lexicon with parameters of type Lexicon Modifier and Type Method Description static void
LexiconManager. register(String name, @NonNull Lexicon lexicon)
Registers a lexicon with a given name for the default language as defined inHermes.defaultLanguage()
.static void
LexiconManager. register(String name, @NonNull Language language, @NonNull Lexicon lexicon)
Registers a lexicon with the given name for the given languagestatic void
LexiconIO. write(Lexicon lexicon, Resource lexiconResource, String defaultTag)
Writes the given lexicon to the given lexicon resource in Json format.
-