Documentation

CustomV1Document extends Prediction
in package

Custom V1 document prediction results.

Table of Contents

Properties

$classifications  : array<string|int, mixed>
$fields  : array<string|int, mixed>

Methods

__construct()  : mixed
__toString()  : string
columnsToLineItems()  : array<string|int, mixed>
Order column fields into line items.

Properties

$classifications

public array<string|int, mixed> $classifications

Array of all classifications in the document.

$fields

public array<string|int, mixed> $fields

Array of all fields in the document.

Methods

__construct()

public __construct(array<string|int, mixed> $rawPrediction) : mixed
Parameters
$rawPrediction : array<string|int, mixed>

Array containing the JSON document response.

__toString()

public __toString() : string
Return values
string

String representation.

columnsToLineItems()

Order column fields into line items.

public columnsToLineItems(array<string|int, mixed> $anchorNames, array<string|int, mixed> $fieldNames, float $heightTolerance) : array<string|int, mixed>
Parameters
$anchorNames : array<string|int, mixed>

List of possible anchor fields.

$fieldNames : array<string|int, mixed>

List of all column fields.

$heightTolerance : float

Height tolerance to apply to lines.

Return values
array<string|int, mixed>

        
On this page

Search results