Documentation

TaxField extends BaseField
in package
uses FieldPositionMixin

Tax line information.

Table of Contents

Properties

$basis  : float|null
$boundingBox  : Polygon|null
$code  : string|null
$confidence  : float
$pageId  : int|mixed|null
$polygon  : Polygon
$rate  : float|null
$reconstructed  : bool
$value  : float|null

Methods

__compare()  : bool
Compares with the value of another field.
__construct()  : mixed
__toString()  : string
toTableLine()  : string
Returns the field as a rst-compliant table line.
setConfidence()  : void
Sets the confidence score.
setPosition()  : void
Sets the position of a field.
printableValues()  : array<string|int, mixed>
Returns an array of immediately printable values.

Properties

$basis

public float|null $basis

The tax base.

$code

public string|null $code

The tax code (HST, GST... for Canadian; City Tax, State tax for US, etc..)."

$pageId

public int|mixed|null $pageId

The document page on which the information was found.

$rate

public float|null $rate

The tax rate.

$reconstructed

public bool $reconstructed

Whether the field was reconstructed from other fields.

$value

public float|null $value

The amount of the tax line.

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 has been reconstructed.

$valueKey : string = 'value'

Key to use for the value.

__toString()

public __toString() : string
Return values
string

String representation.

toTableLine()

Returns the field as a rst-compliant table line.

public toTableLine() : string
Return values
string

Table line as a string.

setConfidence()

Sets the confidence score.

protected setConfidence(array<string|int, mixed> $rawPrediction) : void
Parameters
$rawPrediction : array<string|int, mixed>

Raw prediction array.

setPosition()

Sets the position of a field.

protected setPosition(array<string|int, mixed> $rawPrediction) : void
Parameters
$rawPrediction : array<string|int, mixed>

Raw prediction array.

printableValues()

Returns an array of immediately printable values.

private printableValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array of printable values.


        
On this page

Search results