TextDocument constructor Null safety
Hydrates a const TextDocument from the document properties.
sourceTextis all the analysed text in the document. The text from a JSON document's (analysed) fields is joined with line ending marks;paragraphsis a list of strings after splittingsourceTextat line ending marks;sentencesis a list of strings after splittingsourceTextat sentence ending punctuation and line ending marks;nGramsis a collection of word sequences generated from the terms;termsis all the words in thesourceText;keywordsis the keywords in the document mapped to their RAKE keyword score in a TermCoOccurrenceGraph;syllableCountis the total number of syllables in the document; andtokensis all the tokens extracted fromsourceText.
Implementation
factory TextDocument(
{required String sourceText,
required List<Token> tokens,
required List<String> paragraphs,
required List<String> sentences,
required List<String> terms,
required List<String> nGrams,
required TermCoOccurrenceGraph keywords,
required int syllableCount,
List<String>? zones}) =>
_TextDocumentImpl(sourceText, zones, tokens, paragraphs, sentences, terms,
nGrams, syllableCount, keywords);