Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Document.entities field is unusable when using data from Classifier output #332

@evekhm

Description

@evekhm

Hello,

The wrapped_document, when using document.from_batch_process_metadata (or any other methods) will be missing entities field when using data from the Classifier.

When using output of splitter, everything works fine.
But with classifier - you wont get any important information like type and confidence.

from google.cloud.documentai_toolbox import document
import os

doc = document.Document.from_document_path(os.path.join(os.path.dirname(__file__), "output-document_split.json"))
print(doc.entities)
doc = document.Document.from_document_path(os.path.join(os.path.dirname(__file__), "output-document_classify.json"))
print(doc.entities)

output-document_split.json
output-document_classify.json

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions