Fix TEDS distance over explicit ordered table trees - #76
Closed
lanyue-llk wants to merge 1 commit into
Closed
lanyue-llk wants to merge 1 commit into
lanyue-llk wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
APTED was receiving a serialized string from
TEDSMetric. Its default child accessor therefore saw a leaf rather than the parsed table tree. This PR passes explicit nodes and exposes their children to APTED. It also removes the node-count-only fallback, which could silently produce an optimistic score after an algorithm error.The two existing score assertions that encoded the leaf behavior now expect the actual ordered-tree distance. Added regression cases cover a missing cell and changed cell text.
Validation
tests/test_teds.py: 24 passed using the repository's metric modules and the benchmark runner's locked dependency environment. The full package initializer was bypassed because that environment does not include unrelated WebMainBench data-loader dependencies.This changes historical TEDS values when table trees differ; consumers should rescore from preserved raw outputs and retain the former official score for provenance.