@@ -32,6 +32,7 @@ class TableEvaluation(UnitEvaluation):
3232 table_id : int = - 1
3333 TEDS : float
3434 is_complex : bool = False
35+ structure_only_evaluation : bool = False
3536
3637 true_ncols : int = - 1
3738 pred_ncols : int = - 1
@@ -42,6 +43,7 @@ class TableEvaluation(UnitEvaluation):
4243
4344class DatasetTableEvaluation (DatasetEvaluation ):
4445 evaluations : List [TableEvaluation ]
46+ table_structure_evaluations : List [TableEvaluation ]
4547
4648 TEDS : DatasetStatistics
4749 TEDS_struct : DatasetStatistics
@@ -227,6 +229,7 @@ def __call__(
227229 evaluated_samples = len (table_evaluations ),
228230 rejected_samples = rejected_samples ,
229231 evaluations = table_evaluations ,
232+ table_structure_evaluations = table_struct_evaluations ,
230233 TEDS = compute_stats (teds_all ),
231234 TEDS_struct = compute_stats (teds_struct ),
232235 TEDS_simple = compute_stats (teds_simple ),
@@ -295,6 +298,7 @@ def _evaluate_tables_in_documents(
295298 pred_ncols = pred_table .data .num_cols ,
296299 true_nrows = true_table .data .num_rows ,
297300 pred_nrows = pred_table .data .num_rows ,
301+ structure_only_evaluation = structure_only ,
298302 )
299303 table_evaluations .append (table_evaluation )
300304 except Exception :
0 commit comments