Skip to content

Commit 3b253c1

Browse files
nassarofficialAhmed Nassar
andauthored
fix: chart title (#428)
* pic title fix * DCO Remediation Commit for Ahmed Nassar <ahn@zurich.ibm.com> I, Ahmed Nassar <ahn@zurich.ibm.com>, hereby add my Signed-off-by to this commit: da99c63 Signed-off-by: Ahmed Nassar <ahn@zurich.ibm.com> --------- Signed-off-by: Ahmed Nassar <ahn@zurich.ibm.com> Co-authored-by: Ahmed Nassar <ahn@zurich.ibm.com>
1 parent 8bdeaa7 commit 3b253c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docling_core/types/doc/document.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5644,6 +5644,7 @@ def _add_text(
56445644
if tag_name == DocumentToken.CHART.value:
56455645
table_data = parse_otsl_table_content(full_chunk)
56465646
chart_type = extract_chart_type(full_chunk)
5647+
pic_title = chart_type if chart_type is not None else "other"
56475648
if image:
56485649
if bbox:
56495650
im_width, im_height = image.size
@@ -5679,7 +5680,6 @@ def _add_text(
56795680
)
56805681
pic.captions.append(caption.get_ref())
56815682

5682-
pic_title = "picture"
56835683
pic_classification = None
56845684
if chart_type is not None:
56855685
pic_classification = PictureClassificationMetaField(
@@ -5691,8 +5691,6 @@ def _add_text(
56915691
)
56925692
]
56935693
)
5694-
pic_title = chart_type
5695-
56965694
pic_tabular_chart = None
56975695
if table_data is not None:
56985696
pic_tabular_chart = TabularChartMetaField(

0 commit comments

Comments
 (0)