We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc8b5aa commit 03af14eCopy full SHA for 03af14e
unstructured_inference/inference/elements.py
@@ -250,6 +250,9 @@ def __getitem__(self, indices) -> TextRegions:
250
251
def slice(self, indices) -> TextRegions:
252
"""slice text regions based on indices"""
253
+ # NOTE(alan): I would expect if I try to access a single element, it should return a
254
+ # TextRegion, not a TextRegions. Currently, you get an error when trying to access a single
255
+ # element.
256
return TextRegions(
257
element_coords=self.element_coords[indices],
258
texts=self.texts[indices],
0 commit comments