Skip to content

[Fix]Fix CCOCR evaluation for long text inputs - #1647

Open
XiaoBao-175 wants to merge 1 commit into
open-compass:mainfrom
XiaoBao-175:codex/ccocr-long-text-fix
Open

[Fix]Fix CCOCR evaluation for long text inputs#1647
XiaoBao-175 wants to merge 1 commit into
open-compass:mainfrom
XiaoBao-175:codex/ccocr-long-text-fix

Conversation

@XiaoBao-175

Copy link
Copy Markdown

Problem

CCOCR evaluation uses nltk.edit_distance for document parsing and table-cell TEDS comparison. Recent NLTK versions reject inputs longer than 2000 elements, causing evaluation to fail on long OCR/document outputs.

Changes

  • Replace the three CCOCR edit-distance calls with the existing editdistance dependency.
  • Add regression coverage for 2140-character document and table-cell inputs.

This preserves the Levenshtein-distance metric while avoiding NLTK's fixed safety limit.

Tests

  • /workspace/s/ljh/env/qwen35_official_vllm/bin/python -m unittest -v tests/test_ccocr_evaluator.py
  • git diff --check
  • Python syntax compilation passed.

@XiaoBao-175 XiaoBao-175 changed the title Fix CCOCR evaluation for long text inputs [Fix]Fix CCOCR evaluation for long text inputs Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants