googleapis / googleapis/google-cloud-python

`split_pdf` splits too much, since it does not take into account that different entities might have same type (but different confidence)

Open
#15,823 2 comments 0 reactions 1 assignee Claimed by @holtskinner View on GitHub
Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
3d 4h
Merged PRs (30d)
122

Description

Here is entities example returned from splitter:

```
[text_anchor {
text_segments {
end_index: 1424
}
}
type_: "form1"
confidence: 0.96
page_anchor {
page_refs {
}
page_refs {
page: 1
}
page_refs {
page: 2
}
}
, text_anchor {
text_segments {
start_index: 1424
end_index: 6935
}
}
type_: "form1"
confidence: 0.68
page_anchor {
page_refs {
page: 3
}
page_refs {
page: 4
}
}
]
```

In this case we see that all pages are actually of same type and we should not split. However document.Document.split_pdf would not detect that.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.