mindee
Version:
Mindee Client Library for Node.js
24 lines (23 loc) • 980 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomV1 = void 0;
const common_1 = require("../../parsing/common");
const customV1Document_1 = require("./customV1Document");
const customV1Page_1 = require("./customV1Page");
/**
* Inference prediction for Custom builds.
*/
class CustomV1 extends common_1.Inference {
constructor(rawPrediction) {
super(rawPrediction);
/** The endpoint's name. Note: placeholder for custom APIs. */
this.endpointName = "custom";
/** The endpoint's version. Note: placeholder for custom APIs. */
this.endpointVersion = "1";
/** The document's pages. */
this.pages = [];
this.prediction = new customV1Document_1.CustomV1Document(rawPrediction["prediction"]);
this.pages = rawPrediction["pages"].map((page) => new common_1.Page(customV1Page_1.CustomV1Page, page, page["id"], page["orientation"]));
}
}
exports.CustomV1 = CustomV1;