mindee
Version:
Mindee Client Library for Node.js
17 lines (16 loc) • 521 B
JavaScript
import { ExtraField } from "./extras.js";
export class FullTextOcrExtra extends ExtraField {
constructor(rawPrediction) {
super();
if (rawPrediction["content"]) {
this.content = "content" in rawPrediction ? rawPrediction["content"] : "";
this.languages = "languages" in rawPrediction ? rawPrediction["languages"] : "";
}
}
/**
* Default string representation.
*/
toString() {
return this.content !== undefined ? this.content : "";
}
}