UNPKG

mindee

Version:

Mindee Client Library for Node.js

11 lines (10 loc) 394 B
import { BaseField } from "./base.js"; /** * Represents a classifier value. */ export class ClassificationField extends BaseField { constructor({ prediction = {}, valueKey = "value", reconstructed = false, pageId = undefined, }) { super({ prediction, valueKey, reconstructed, pageId }); this.confidence = prediction["confidence"] ? prediction["confidence"] : 0.0; } }