type_definitions library
A mini-lbrary of text_indexing
that exports all the typedefs in the
text_indexing
package.
Also exports the typedefs from the text_analysis
package.
Typedefs
-
AsyncTermModifier
= Future<
String?> Function(String term, [String? zone]) - Modifies the term and returns the modified version.
-
AsyncTextSplitter
= Future<
List< Function(String source)String> > -
A splitter function that returns a list of terms from
source
. - CharacterFilter = String Function(String source, [String? zone])
-
Type definition of a function that filters characters from the
source
text in preparation of tokenization. -
CollectionSizeCallback
= Future<
int> Function() - A callback that asynchronously retrieves the number of terms in the vocabulary (N).
-
DftMap
= Map<
String, Ft> -
Alias for
Map<String, int>
. -
DftMapEntry
= MapEntry<
String, Ft> -
Alias for
MapEntry<String, Ft>
. -
DftMapLoader
= Future<
Map< Function([Iterable<String, int> >String> ? terms]) -
A callback that asynchronously retrieves a DftMap subset for a collection
of
terms
from a DftMap data source, usually persisted storage. -
DftMapUpdater
= Future<
void> Function(DftMap values) -
A callback that passes
values
for persisting to a DftMap. -
DocPostingsMap
= Map<
String, ZonePostingsMap> - Type definition for a hashmap of document id to ZonePostingsMap.
-
DocPostingsMapEntry
= MapEntry<
String, ZonePostingsMap> - Type definition for a hashmap entry of document id to ZonePostingsMap in a DocPostingsMap hashmap.
- Ft = int
-
An alias for
int
, used to denote the frequency of a term in an index or indexed object. -
FtdPostings
= Map<
String, Map< String, Ft> > -
Alias for
Map<String, Map<String, int>>
. - IdFt = double
-
Alias for
double
where it represents the inverse document frequency of a term. -
IdFtIndex
= Map<
String, IdFt> -
Alias for
Map<String, double>
. -
JSON
= Map<
String, dynamic> -
Alias for
Map<String, dynamic>
, a hashmap known asJava Script Object Notation
, a common format for persisting data. -
JsonCollection
= Map<
String, Map< String, dynamic> > -
Alias for
Map<String, Map<String, dynamic>>
, a hashmap ofString
toMap<String, dynamic>
documents. -
JsonTokenizer
= Future<
List< Function(Map<Token> >String, dynamic> document, {NGramRange? nGramRange, TokenFilter? tokenFilter, Iterable<String> ? zones}) -
Type definition of a function that returns a collection of Token from
the
zones
in a JSONdocument
. -
KeyWordPostings
= Map<
String, double> - Type definition for a hashmap of document ids to keyword scores for a keyword in each document.
-
KeywordPostingsMap
= Map<
String, KeyWordPostings> - Type definition for a hashmap of keywords to a map of document ids to keyword scores for that keyword in each document.
-
KeywordPostingsMapLoader
= Future<
KeywordPostingsMap> Function(Iterable<String> keywords) -
Asynchronously retrieves a KeywordPostingsMap subset for a collection of
keywords
from a KeywordPostingsMap data source, usually persisted storage. -
KeywordPostingsMapUpdater
= Future<
void> Function(KeywordPostingsMap values) -
A callback that
values
for persisting to a KeywordPostingsMap. -
KGramsMap
= Map<
String, Set< String> > -
Alias for
Map<String, Set<String>>
. -
KGramsMapLoader
= Future<
KGramsMap> Function([Iterable<String> ? terms]) -
A callback that asynchronously retrieves a KGramsMap subset for a
collection of
terms
from a KGramsMap data source, usually persisted storage. -
KGramsMapUpdater
= Future<
void> Function(KGramsMap values) -
A callback that passes
values
for persisting to a KGramsMap. -
NGrammer
= List<
String> Function(String text, NGramRange range) - A language-specific function that generates n-grams from text.
-
PhraseSplitter
= Future<
List< Function(String source, [String? zone])String> > -
A splitter function that returns a list of terms from
source
. -
PostingsMap
= Map<
String, DocPostingsMap> - Type definition for a hashmap of term to DocPostingsMap.
-
PostingsMapEntry
= MapEntry<
String, DocPostingsMap> - Type definition for a hashmap entry of term to DocPostingsMap in a PostingsMap hashmap.
-
PostingsMapLoader
= Future<
PostingsMap> Function(Iterable<String> terms) -
Asynchronously retrieves a PostingsMap subset for a collection of
terms
from a PostingsMap data source, usually persisted storage. -
PostingsMapUpdater
= Future<
void> Function(PostingsMap values) -
A callback that
values
for persisting to a PostingsMap. - Pt = int
- An alias for int, used to denote the position of a term in String indexed object (the term position).
- SyllableCounter = int Function(String term)
- A language-specific function that returns the number of syllables in a string after stripping out all white-space and punctuation.
-
TermExpander
= Future<
Iterable< Function(String source, [String? zone])String> > - A callback that expands text to a collection of related Strings.
- TermModifier = String? Function(String term)
- Modifies the term and returns the modified version.
-
TermPositions
= List<
Pt> - Type definition for an ordered Set of unique zero-based term positions in a text source, sorted in ascending order.
-
TextSplitter
= List<
String> Function(String 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<
List< Function(String source, {NGramRange? nGramRange, TokenFilter? tokenFilter, String? zone})Token> > -
Type definition of a function that returns a collection of Token from
the
source
text. -
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.
-
ZonePostingsMap
= Map<
String, TermPositions> - Type definition for a hashmap of zones to TermPositions.
-
ZonePostingsMapEntry
= MapEntry<
String, TermPositions> - Type definition for a hashmap entry of zone to TermPositions in a ZonePostingsMap hashmap.
-
ZoneWeightMap
= Map<
String, double> -
Alias for
Map<String, double>
.