Skip to content

Document

Defined in: document.ts:57

A parsed document: the text, its sentences, and a flat token stream.

annotations: SpanAnnotation<unknown>[]

Defined in: document.ts:69

Parser-independent annotations supplied by recognizers or callers.


language: string

Defined in: document.ts:60

Default BCP 47 language tag for the document.


paragraphs: Paragraph[]

Defined in: document.ts:63

Blank-line-delimited blocks for paragraph-level rules and aggregation.


parser: ParserDescriptor

Defined in: document.ts:71

Parser identity and the capabilities available during this run.


regions: DocumentRegion<unknown>[]

Defined in: document.ts:67

Extractor-supplied source roles, separate from the linguistic parse.


sentences: Sentence[]

Defined in: document.ts:61


text: string

Defined in: document.ts:58


tokens: Tok[]

Defined in: document.ts:65

Flat word-token stream across the whole document (lexical convenience).