You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 405, in wrapper
result = user_function(self)
File "<string>", line 3, in __repr__
AttributeError: 'Entity' object has no attribute 'start_page'
Both start_page and end_page need to be made Optional (since this info is not provided by the Classifier)
holtskinner
changed the title
Document.enities field is unusable when using data from Classifier outputDocument.entities field is unusable when using data from Classifier output
Jul 11, 2024
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.
output-document_split.json
output-document_classify.json
The text was updated successfully, but these errors were encountered: