mindee
Version:
Mindee Client Library for Node.js
32 lines (31 loc) • 1.37 kB
TypeScript
import { Extras } from "./extras/extras";
import { OrientationField } from "./orientation";
import { Prediction } from "./prediction";
import { StringDict } from "./stringDict";
/**
* 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.
* @typeParam T an extension of an `Prediction`. Mandatory in order to properly create a page-level prediction.
*/
export declare class Page<T extends Prediction> {
/** The page's index (identifier). */
id: number;
/** The page's orientation */
orientation?: OrientationField;
/** A page-level prediction. Can either be specific to pages or identical to the document prediction. */
prediction: T;
/** Potential `Extras` fields sent back along with the prediction. */
extras?: Extras;
/**
* @param predictionType constructor signature for an inference.
* @param rawPrediction raw http response.
* @param pageId the page's index (identifier).
* @param orientation the page's orientation.
*/
constructor(predictionType: new (rawPrediction: StringDict, pageId: number) => T, rawPrediction: StringDict, pageId: number, orientation?: StringDict);
/**
* Default string representation.
*/
toString(): string;
private injectFullTextOcr;
}