OcrWord
in package
uses
FieldPositionMixin
A single word.
Table of Contents
Properties
- $boundingBox : Polygon|null
- $confidence : float|mixed
- $polygon : Polygon
- $text : string|mixed
Methods
- __construct() : mixed
- __toString() : string
- setPosition() : void
- Sets the position of a field.
Properties
$boundingBox
public
Polygon|null
$boundingBox
A right rectangle containing the word in the document.
$confidence
public
float|mixed
$confidence
The confidence score.
$polygon
public
Polygon
$polygon
A polygon containing the word in the document.
$text
public
string|mixed
$text
The extracted text.
Methods
__construct()
public
__construct(array<string|int, mixed> $rawPrediction) : mixed
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.
__toString()
public
__toString() : string
Return values
string —String representation.
setPosition()
Sets the position of a field.
protected
setPosition(array<string|int, mixed> $rawPrediction) : void
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.