NLUResult

A container for accessing linguistic annotations. Access sentences and named entities.

Implements

Fields

has_vector (Boolean)

A boolean value indicating whether a word vector is associated with the object.

text (String)

Verbatim text content.

text_with_ws (String)

Text content, with trailing space character if present.

vector ([Float])

A real-valued meaning representation.

vector_norm (Float)

The L2 norm of the document’s vector representation.

entities ([NLUSpan])

The named entities in the document. Returns a list of named entity Span objects, if the entity recognizer has been applied.

noun_chunks ([NLUSpan])

The base noun phrases in the document. Returns a list of base noun-phrase Span objects, if the document has been syntactically parsed. A base noun phrase, or “NP chunk”, is a noun phrase that does not permit other NPs to be nested within it – so no NP-level coordination, no prepositional phrases, and no relative clauses.

sentences ([NLUSpan])

The the sentences in the document. Sentence spans have no label. To improve accuracy on informal texts, spaCy calculates sentence boundaries from the syntactic dependency parse. If the parser is disabled, the sents iterator will be unavailable.

tokens ([NLUToken])

The tokens of the document.