ClassificationField
extends BaseField
in package
Represents a classifier value.
Table of Contents
Properties
- $confidence : float|mixed
- $pageId : int|mixed|null
- $reconstructed : bool
- $value : string|mixed|null
Methods
- __compare() : bool
- Compares with the value of another field.
- __construct() : mixed
- __toString() : string
- setConfidence() : void
- Sets the confidence score.
Properties
$confidence
public
float|mixed
$confidence
The confidence score.
$pageId
public
int|mixed|null
$pageId
The document page on which the information was found.
$reconstructed
public
bool
$reconstructed
Whether the field was reconstructed from other fields.
$value
public
string|mixed|null
$value
The classification value.
Methods
__compare()
Compares with the value of another field.
public
__compare(BaseField $obj) : bool
Parameters
- $obj : BaseField
-
Field to compare.
Return values
bool__construct()
public
__construct(array<string|int, mixed> $rawPrediction[, int|null $pageId = null ][, bool $reconstructed = false ][, string $valueKey = 'value' ]) : mixed
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.
- $pageId : int|null = null
-
Page number for multi pages document.
- $reconstructed : bool = false
-
Whether the field was reconstructed.
- $valueKey : string = 'value'
-
Key to use for the value.
__toString()
public
__toString() : string
Return values
string —String representation.
setConfidence()
Sets the confidence score.
protected
setConfidence(array<string|int, mixed> $rawPrediction) : void
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.