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
I convert the document into docling document and when I do the filtering of the DocItemLabel.TABLE, some of the tables are missing. Below is a code snippet.
defextract_lookup_pages(doc: DoclingDocument) ->Dict[str, int]:
"""Extract lookup pages from a document."""header_tables= []
foritem, _indoc.iterate_items(included_content_layers={ContentLayer.BODY}):
ifgetattr(item, "label", None) ==DocItemLabel.TABLE:
# You may want to refine this filter for your specific header locationheader_tables.append(item)
header_text="\n".join(
[" | ".join(cell.textforcellinrow) forrowinitem.data.grid]
)
print(header_text)
returnextract_table_of_contents(header_tables)
I realize that there are missing table if run the snippet above. BUT, when I convert it into Markdown or doctags, the tables are there. do you have any idea why it happens?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I convert the document into docling document and when I do the filtering of the DocItemLabel.TABLE, some of the tables are missing. Below is a code snippet.
I realize that there are missing table if run the snippet above. BUT, when I convert it into Markdown or doctags, the tables are there. do you have any idea why it happens?
cheers,
ahm
Beta Was this translation helpful? Give feedback.
All reactions