Skip to content

fix: move OOV test cases out of shared test data to fix C++ unit tests#370

Merged
pengzhendong merged 1 commit into
masterfrom
fix/cpp-runtime-oov-test
Jun 15, 2026
Merged

fix: move OOV test cases out of shared test data to fix C++ unit tests#370
pengzhendong merged 1 commit into
masterfrom
fix/cpp-runtime-oov-test

Conversation

@pengzhendong

Copy link
Copy Markdown
Member

Summary

Move OOV (out-of-vocabulary) test cases from normalizer.txt to a separate normalizer_tag_oov.txt file, only loaded by the Python test.

Root Cause

The C++ runtime test loads normalizer.txt but uses FST files built without tag_oov=True (the default). The OOV test cases expecting <oov> wrapping always fail. The Python test passes because it uses tag_oov=True and overwrite_cache=True.

Fix

  • Removed OOV test cases from tn/chinese/test/data/normalizer.txt
  • Added tn/chinese/test/data/normalizer_tag_oov.txt with the OOV cases
  • Updated Python test to load the new file

Test Plan

  • C++ processor_test: 46/46 passed
  • Python full test suite: 1890/1890 passed

Fixes #368

The C++ runtime test loads test data from normalizer.txt but uses FSTs
built without tag_oov=True. OOV test cases (Korean/Japanese characters)
that require <oov> wrapping are moved to a separate file only loaded by
the Python test (which uses tag_oov=True).

Fixes #368
@pengzhendong pengzhendong merged commit c094e41 into master Jun 15, 2026
1 check passed
@pengzhendong pengzhendong deleted the fix/cpp-runtime-oov-test branch June 15, 2026 06:52
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.

Runtime unit-test(processor_test) failed

1 participant