Developer guide for importing annotations on document (PDF) data and sample import formats.
DocumentRectangle
value, which defines its precise area on a document page. You can choose from the following RectangleUnit
options, which determine the measurement unit used to define the dimensions and coordinates of the bounding box:
textSelections
is the payload required for each entity annotation. EachtextSelections
item in the list requires the following fields:
groupId
associated with a group of words.tokenIds
for each word in the group of words.page
of the document (1-indexed).tokenIds
and groupdId
can extracted from the text layer URL attached to the data row. For more information on text layers, visit our import document data guide.
text_layer_url
or a Labelbox-generated text_layer_url
.
You can get the Labelbox-generated text_layer_url
by exporting the data row. The below code snippet demonstrates this process by exporting from a data row.
API_KEY
with a valid API key to connect to the Labelbox client.
name
parameter should match the value of the name
field in your annotation.
For example, when we created an annotation above, we provided a nameannotation_name
. Now, when we set up our ontology, we must ensure that the name of our bounding box tool is also anotations_name
. The same alignment must hold true for the other tools and classifications we create in our ontology.
This example shows how to create an ontology containing all supported annotation types .
predictions
parameter. For ground truths, pass the payload to the labels
parameter.