type_definitions library

Exports all the type definitions used in the text_analysis library.

Typedefs

AsyncTermModifier = Future<String?> Function(String term, [String? zone])
Modifies the term and returns the modified version.
AsyncTextSplitter = Future<List<String>> Function(String source)
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.
JsonTokenizer = Future<List<Token>> Function(Map<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 JSON document.
KGramsMap = Map<String, Set<String>>
Alias for Map<String, Set<String>>.
NGrammer = List<String> Function(String text, NGramRange range)
A language-specific function that generates n-grams from text.
PhraseSplitter = Future<List<String>> Function(String source, [String? zone])
A splitter function that returns a list of terms from source.
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<String>> Function(String source, [String? zone])
A callback that expands text to a collection of related Strings.
TermModifier = String? Function(String term)
Modifies the term and returns the modified version.
TextSplitter = List<String> Function(String source)
A splitter function that returns a list of terms from source.
TokenFilter = Future<List<Token>> Function(List<Token> tokens)
A filter function that returns a subset of tokens.
Tokenizer = Future<List<Token>> Function(String source, {NGramRange? nGramRange, TokenFilter? tokenFilter, String? zone})
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.