fix: preserve already matching ECCV literal text before entity decoding
Metadata integrity checks / metadata (push) Successful in 3m8s

This commit is contained in:
2026-11-17 16:07:06 +08:00
parent 279d6a2735
commit f800c6ecb4
5 changed files with 38 additions and 10 deletions
Binary file not shown.
+11
View File
@@ -126,3 +126,14 @@ class ECCV2026Tests(unittest.TestCase):
for replacement in ('Other Author', 'Zi'ang Lu'):
with self.assertRaisesRegex(ValueError, 'authors disagree'):
c.parse_paper(raw.replace('Zi'ang Lu', replacement), sample['receipt']['url'], self.program[pid])
def test_real_already_agreeing_literal_title_is_not_decoded_again(self):
import hashlib
sample = self.bundle['literal_title_sample']; pid = sample['paper_id']; raw = sample['html']
self.assertEqual(hashlib.sha256(raw.encode('utf-8')).hexdigest(), 'c208525ad5f02b4ca274dff7e24a0392dabdc55bb3620497079a84df81a02a72')
fields = c.parse_paper(raw, sample['receipt']['url'], self.program[pid])
self.assertIn('&', fields['title'])
self.assertEqual(fields['title'], sample['gold']['visible_title'])
self.assertEqual(fields['jsonld_raw_text']['name'], sample['gold']['jsonld_title_raw'])
self.assertNotEqual(fields['title'], sample['gold']['blind_double_decoded_title'])
self.assertNotIn('jsonld_display_text_normalized_requires_review', fields['review_flags'])