Reference documentation and code samples for the Google Cloud Document Ai V1 Client class ShardInfo.
For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.
Generated from protobuf message google.cloud.documentai.v1.Document.ShardInfo
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ shard_index |
int|string
The 0-based index of this shard. |
↳ shard_count |
int|string
Total number of shards. |
↳ text_offset |
int|string
The index of the first character in Document.text in the overall document global text. |
getShardIndex
The 0-based index of this shard.
Returns | |
---|---|
Type | Description |
int|string |
setShardIndex
The 0-based index of this shard.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getShardCount
Total number of shards.
Returns | |
---|---|
Type | Description |
int|string |
setShardCount
Total number of shards.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getTextOffset
The index of the first character in Document.text in the overall document global text.
Returns | |
---|---|
Type | Description |
int|string |
setTextOffset
The index of the first character in Document.text in the overall document global text.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |