Interface of items with an id value.

Implements

Properties

container: Analysis

The full analysis object containing this paragraph.

id: string

ID of the paragraph used to refer to it from other objects.

origText: string

The original paragraph text as in the request.

sentences: Sentence[]

The sentences the paragraph consists of.

sentiment: null | Sentiment

Optional sentiment of the paragraph.

text: string

The paragraph text, possibly after correction (token offsets link here).

type: string

Title, section heading, lead, body text, etc. For now, it is simply the segment type: title, lead, body.

vectors: null | Vector[]

Optional vectors for this paragraph.

TYPE_ABSTRACT: "ABSTRACT"

Type of a paragraph representing an abstract (lead or perex) of the whole document.

TYPE_BODY: "BODY"

Type of a paragraph containing regular text (for now this is used for the whole body of the document).

TYPE_SECTION_HEADING: "section_heading"

Type of a paragraph representing a section/chapter heading (not used yet).

TYPE_TITLE: "TITLE"

Type of a paragraph representing a title of the whole document. Also used for email subjects.

Methods

  • Paragraph factory method, public constructor.

    Parameters

    • id: string
    • type: string
    • text: string
    • origText: null | string = null
    • sentences: null | Sentence[] = null
    • sentiment: null | Sentiment = null
    • vectors: null | Vector[] = null

    Returns Paragraph