Class Page<T>

Page prediction wrapper class. Holds the results of a parsed document's page. Holds a Prediction that's either a document-level Prediction, or inherits from one.

Type Parameters

  • T extends Prediction

    an extension of an Prediction. Mandatory in order to properly create a page-level prediction.

Constructors

Properties

Methods

Constructors

  • Type Parameters

    Parameters

    • predictionType: (new (rawPrediction: StringDict, pageId: number) => T)

      constructor signature for an inference.

        • new (rawPrediction, pageId): T
        • Parameters

          Returns T

    • rawPrediction: StringDict

      raw http response.

    • pageId: number

      the page's index (identifier).

    • Optionalorientation: StringDict

      the page's orientation.

    Returns Page<T>

Properties

extras?: Extras<ExtraField>

Potential Extras fields sent back along with the prediction.

id: number

The page's index (identifier).

orientation?: OrientationField

The page's orientation

prediction: T

A page-level prediction. Can either be specific to pages or identical to the document prediction.

Methods