type_definitions library
Import the type_definitions library to use types defined in the
dictosaurus package.
- DictionaryCallback - an asynchronous callback that returns the properties of a term from a dictionary provider or API.
- TermExpander - an asynchronous callback that returns an expansion of
a term from an asynchronous provider or API.
Also includes all the type definitions from the
text_analysis/ type_definitionslibrary.
Typedefs
- CharacterFilter = String Function(SourceText source)
-
Type definition of a function that filters characters from the
sourcetext in preparation of tokenization. -
DictionaryCallback
= Future<
DictionaryEntry?> Function(String term) -
Function definition of an asynchronous callback that returns the properties
of a
termfrom a dictionary provider or API. -
JsonTokenizer
= Future<
Iterable< Function(Map<Token> >String, dynamic> json, List<Zone> fields, {NGramRange? nGramRange, TokenizingStrategy? strategy}) -
Type definition of a function that returns a collection of Token from
the
fieldsin ajsondocument. -
KeywordExtractor
= List<
List< Function(SourceText source, {NGramRange? nGramRange})String> > - A splitter function that returns an ordered collection of keyword phrases from text.
- KGram = String
- An alias for String, used in the context of a sequence of k characters from a Term.
-
KGramsMap
= Map<
KGram, Set< Term> > -
Alias for
Map<String, Set<String>>. - Lemmatizer = String Function(Term term)
-
A language-specific function that returns the lemma of
term. -
NGrammer
= List<
String> Function(String text, NGramRange range) - A language-specific function that generates n-grams from text.
-
ParagraphSplitter
= List<
String> Function(String source) -
A splitter function that returns a list of paragraphs from
source. -
Phrase
= List<
String> -
An alias for
List<String>when used in the context of the terms of a phrase split to an ordered list of terms. -
SentenceSplitter
= List<
String> Function(SourceText source) -
A splitter function that returns a list of sentences from
source. - SourceText = String
- An alias for String.
- Stemmer = String Function(Term term)
-
A language-specific function that returns the stem of
term. -
StopWords
= Set<
Term> - An alias for a Set of String, when used in the context of a collection of Term that are excluded from tokenization.
- SyllableCounter = int Function(Term term)
- A language-specific function that returns the number of syllables in a string after stripping out all white-space and punctuation.
- Term = String
- An alias for String, used in the context of a word, term or phrase present in a text source, document or query.
-
TermExpander
= Future<
Set< Function(String term, [PartOfSpeech? partOfSpeech])String> > -
Function definition of an asynchronous callback that returns an expansion of
a
termfrom an asynchronous provider or API. -
TermFilter
= Set<
String> Function(Term term) - A filter function that returns a collection of terms from term:
-
TermSplitter
= List<
String> Function(SourceText source) -
A splitter function that returns a list of terms from
source. -
TokenFilter
= Future<
List< Function(List<Token> >Token> tokens) -
A filter function that returns a subset of
tokens. -
Tokenizer
= Future<
Iterable< Function(SourceText source, {NGramRange? nGramRange, TokenizingStrategy? strategy, Zone? zone})Token> > -
Type definition of a function that returns a collection of Token from
the
sourcetext. -
TranslationCallback
= Future<
Set< Function(String term, Language sourceLanguage, Language targetLanguage)TermVariant> > -
Returns translations for
termfromsourceLanguagetotargetLanguageas a collection of TermVariants. -
VectorSpace
= Map<
String, num> - Type definition for a hashmap of Term to value, when used as a n-dimensional vector in calculating cosine similarity between documents.
- Zone = String
-
An alias for String, when used in the context of a field or meta data field
in the
corpus. Represents the name of the field/zone.