normalizer-tr 0.3.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- normalizer_tr-0.5.0/CHANGELOG.md +107 -0
- normalizer_tr-0.5.0/CONTRIBUTING.md +174 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/Cargo.lock +2 -2
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/Cargo.toml +2 -2
- normalizer_tr-0.5.0/PERFORMANCE.md +132 -0
- normalizer_tr-0.5.0/PKG-INFO +181 -0
- normalizer_tr-0.5.0/README.md +108 -0
- {normalizer_tr-0.3.0/bindings/python → normalizer_tr-0.5.0}/THIRD_PARTY_NOTICES-PROJECT.md +5 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/THIRD_PARTY_NOTICES.md +5 -0
- normalizer_tr-0.5.0/benches/latency.rs +473 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/benches/python_latency.py +96 -2
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/Cargo.toml +2 -2
- normalizer_tr-0.5.0/bindings/python/README.md +130 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0/bindings/python}/THIRD_PARTY_NOTICES-PROJECT.md +5 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/src/lib.rs +70 -10
- normalizer_tr-0.5.0/bindings/python/tests/test_fallback.py +80 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/tests/test_general.py +3 -1
- normalizer_tr-0.5.0/bindings/python/tests/test_policy_contract.py +64 -0
- normalizer_tr-0.5.0/docs/fallback.md +114 -0
- normalizer_tr-0.5.0/docs/normalization.md +308 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/pyproject.toml +1 -1
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/python/normalizer_tr/__init__.py +29 -8
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/python/normalizer_tr/_native.pyi +1 -0
- normalizer_tr-0.5.0/src/api/control.rs +41 -0
- normalizer_tr-0.5.0/src/api/diagnostics.rs +146 -0
- normalizer_tr-0.5.0/src/api/error.rs +52 -0
- normalizer_tr-0.5.0/src/api/mod.rs +16 -0
- normalizer_tr-0.5.0/src/api/options.rs +70 -0
- normalizer_tr-0.5.0/src/api/result.rs +144 -0
- normalizer_tr-0.5.0/src/api/source.rs +24 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/boundaries.rs +28 -10
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/mod.rs +24 -17
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/readers/electronic.rs +1 -1
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/readers/identifiers.rs +11 -6
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/readers/lexical.rs +6 -6
- normalizer_tr-0.5.0/src/classify/readers/mod.rs +229 -0
- normalizer_tr-0.5.0/src/classify/readers/numeric.rs +77 -0
- normalizer_tr-0.5.0/src/classify/readers/pronunciation.rs +30 -0
- normalizer_tr-0.5.0/src/classify/readers/quantities.rs +224 -0
- normalizer_tr-0.5.0/src/classify/scan/lists.rs +166 -0
- normalizer_tr-0.5.0/src/classify/scan/mod.rs +196 -0
- normalizer_tr-0.5.0/src/classify/scan/piece.rs +159 -0
- normalizer_tr-0.5.0/src/classify/scan/punctuation.rs +162 -0
- normalizer_tr-0.5.0/src/classify/scan/signals.rs +96 -0
- normalizer_tr-0.5.0/src/classify/symbols.rs +98 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/temporal.rs +30 -16
- normalizer_tr-0.5.0/src/data/provenance.md +57 -0
- normalizer_tr-0.5.0/src/domain/lexicon/abbreviations/civic.rs +94 -0
- normalizer_tr-0.5.0/src/domain/lexicon/abbreviations/education.rs +14 -0
- normalizer_tr-0.5.0/src/domain/lexicon/abbreviations/finance.rs +55 -0
- normalizer_tr-0.5.0/src/domain/lexicon/abbreviations/technology.rs +40 -0
- normalizer_tr-0.5.0/src/domain/lexicon/abbreviations/titles.rs +31 -0
- normalizer_tr-0.5.0/src/domain/lexicon/abbreviations.rs +147 -0
- normalizer_tr-0.5.0/src/domain/lexicon/pronunciations/ai.rs +36 -0
- normalizer_tr-0.5.0/src/domain/lexicon/pronunciations/consumer.rs +49 -0
- normalizer_tr-0.5.0/src/domain/lexicon/pronunciations/developer.rs +43 -0
- normalizer_tr-0.5.0/src/domain/lexicon/pronunciations.rs +102 -0
- normalizer_tr-0.5.0/src/domain/lexicon/static_index.rs +91 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/domain/lexicon.rs +112 -27
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/domain/mod.rs +2 -0
- normalizer_tr-0.5.0/src/domain/numeric.rs +269 -0
- normalizer_tr-0.5.0/src/domain/quantities.rs +192 -0
- normalizer_tr-0.3.0/src/model.rs → normalizer_tr-0.5.0/src/domain/temporal.rs +33 -36
- normalizer_tr-0.5.0/src/interpretation.rs +180 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/lib.rs +7 -3
- normalizer_tr-0.5.0/src/notation/mod.rs +22 -0
- normalizer_tr-0.5.0/src/notation/quantities.rs +71 -0
- normalizer_tr-0.5.0/src/notation/suffix.rs +20 -0
- normalizer_tr-0.5.0/src/notation/symbols.rs +158 -0
- normalizer_tr-0.5.0/src/notation/temporal.rs +86 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/numerals.rs +54 -10
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/pipeline.rs +95 -21
- normalizer_tr-0.5.0/src/resolution/fallback/literal.rs +165 -0
- normalizer_tr-0.5.0/src/resolution/fallback/mod.rs +81 -0
- normalizer_tr-0.5.0/src/resolution/fallback/output.rs +72 -0
- normalizer_tr-0.5.0/src/resolution/mod.rs +24 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/verbalize.rs +21 -17
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/current_contract.rs +2 -0
- normalizer_tr-0.5.0/tests/fallback.rs +416 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/financial_baseline.rs +6 -1
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/compound-boundaries.json +80 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/date-intent.json +20 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/initialism-boundaries.json +69 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/initialisms.json +65 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/lexical-readings.json +33 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/money-grouping.json +44 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/pronunciation-ai.json +12 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/pronunciation-boundaries.json +21 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/pronunciation-consumer.json +17 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/pronunciation-developer.json +14 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/pronunciation-ema-lightning.json +11 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/pronunciation-variants.json +72 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/quantity-notation.json +114 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/review-mixed-members.json +6 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/review-money-ownership.json +7 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/review-tight-admission.json +10 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/source-context.json +78 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/source-punctuation.json +39 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract/unresolved-outcomes.json +92 -0
- normalizer_tr-0.5.0/tests/fixtures/policy-contract.json +21 -0
- normalizer_tr-0.5.0/tests/initialisms.rs +433 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/partial_results.rs +2 -2
- normalizer_tr-0.5.0/tests/policy_contract.rs +241 -0
- normalizer_tr-0.5.0/tests/pronunciations.rs +438 -0
- normalizer_tr-0.5.0/tests/review_regressions.rs +280 -0
- normalizer_tr-0.5.0/tests/support/policy_contract.rs +110 -0
- normalizer_tr-0.3.0/CONTRIBUTING.md +0 -87
- normalizer_tr-0.3.0/PERFORMANCE.md +0 -72
- normalizer_tr-0.3.0/PKG-INFO +0 -284
- normalizer_tr-0.3.0/README.md +0 -211
- normalizer_tr-0.3.0/benches/latency.rs +0 -239
- normalizer_tr-0.3.0/bindings/python/README.md +0 -98
- normalizer_tr-0.3.0/docs/normalization.md +0 -130
- normalizer_tr-0.3.0/docs/release.md +0 -35
- normalizer_tr-0.3.0/src/api.rs +0 -328
- normalizer_tr-0.3.0/src/classify/readers/mod.rs +0 -176
- normalizer_tr-0.3.0/src/classify/readers/numeric.rs +0 -59
- normalizer_tr-0.3.0/src/classify/readers/quantities.rs +0 -136
- normalizer_tr-0.3.0/src/classify/scan.rs +0 -280
- normalizer_tr-0.3.0/src/data/provenance.md +0 -28
- normalizer_tr-0.3.0/src/domain/numeric.rs +0 -482
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/LICENSE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/LICENSE-PROJECT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/benches/corpus.json +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/benches/intent-corpus.json +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/LICENSE-PROJECT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/constraints.lock +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/examples/showcase.py +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/aho-corasick-1.1.5/COPYING +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/aho-corasick-1.1.5/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/heck-0.5.0/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/heck-0.5.0/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/libc-0.2.189/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/libc-0.2.189/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/memchr-2.8.3/COPYING +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/memchr-2.8.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/portable-atomic-1.15.0/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/portable-atomic-1.15.0/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/proc-macro2-1.0.107/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/proc-macro2-1.0.107/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-build-config-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-build-config-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-ffi-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-ffi-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-macros-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-macros-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-macros-backend-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/pyo3-macros-backend-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/quote-1.0.47/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/quote-1.0.47/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/regex-1.13.1/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/regex-1.13.1/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/regex-automata-0.4.18/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/regex-automata-0.4.18/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/regex-syntax-0.8.11/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/regex-syntax-0.8.11/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/rust-std-1.99.0/COPYRIGHT-library.html +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/rust-std-1.99.0/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/rust-std-1.99.0/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/syn-2.0.119/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/syn-2.0.119/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/syn-3.0.6/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/syn-3.0.6/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/target-lexicon-0.13.5/LICENSE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/tinyvec-1.13.3/LICENSE-APACHE.md +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/tinyvec-1.13.3/LICENSE-MIT.md +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/tinyvec-1.13.3/LICENSE-ZLIB.md +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-ident-1.0.26/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-ident-1.0.26/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-ident-1.0.26/LICENSE-UNICODE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-normalization-0.1.25/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-normalization-0.1.25/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-segmentation-1.13.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/licenses/unicode-segmentation-1.13.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/requirements-dev.txt +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/bindings/python/tests/test_api.py +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/examples/general.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/examples/normalize.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/aho-corasick-1.1.5/COPYING +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/aho-corasick-1.1.5/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/heck-0.5.0/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/heck-0.5.0/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/libc-0.2.189/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/libc-0.2.189/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/memchr-2.8.3/COPYING +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/memchr-2.8.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/portable-atomic-1.15.0/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/portable-atomic-1.15.0/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/proc-macro2-1.0.107/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/proc-macro2-1.0.107/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-build-config-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-build-config-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-ffi-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-ffi-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-macros-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-macros-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-macros-backend-0.29.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/pyo3-macros-backend-0.29.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/quote-1.0.47/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/quote-1.0.47/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/regex-1.13.1/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/regex-1.13.1/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/regex-automata-0.4.18/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/regex-automata-0.4.18/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/regex-syntax-0.8.11/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/regex-syntax-0.8.11/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/rust-std-1.99.0/COPYRIGHT-library.html +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/rust-std-1.99.0/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/rust-std-1.99.0/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/syn-2.0.119/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/syn-2.0.119/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/syn-3.0.6/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/syn-3.0.6/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/target-lexicon-0.13.5/LICENSE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/tinyvec-1.13.3/LICENSE-APACHE.md +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/tinyvec-1.13.3/LICENSE-MIT.md +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/tinyvec-1.13.3/LICENSE-ZLIB.md +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-ident-1.0.26/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-ident-1.0.26/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-ident-1.0.26/LICENSE-UNICODE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-normalization-0.1.25/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-normalization-0.1.25/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-segmentation-1.13.3/LICENSE-APACHE +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/licenses/unicode-segmentation-1.13.3/LICENSE-MIT +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/python/normalizer_tr/py.typed +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/rust-toolchain.toml +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/classify/context.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/domain/electronic.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/domain/identifiers.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/morphology.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/normalizer.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/resources.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/src/source_map.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/classes.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/controls.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/fixtures/current-contract.json +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/fixtures/financial-input.txt +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/fixtures/financial-output.txt +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/general_coverage.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/general_invariants.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/properties.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/recognition_priority.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/serde_parity.rs +0 -0
- {normalizer_tr-0.3.0 → normalizer_tr-0.5.0}/tests/source_mapping.rs +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Entries describe versioned changes and migration requirements.
|
|
4
|
+
For publishing instructions, see [CONTRIBUTING](CONTRIBUTING.md#releasing).
|
|
5
|
+
Platform requirements are in the [README](README.md) and
|
|
6
|
+
[Python installation guide](bindings/python/README.md#install).
|
|
7
|
+
|
|
8
|
+
## 0.5.0 - 2026-10-09
|
|
9
|
+
|
|
10
|
+
- Remove repeated numeric-prefix scans from comma-boundary detection and literal
|
|
11
|
+
fallback. Retain valid later numeric readings and cooperative control checks.
|
|
12
|
+
- Keep attached duplicate currency markers in one invalid prefixed amount rather
|
|
13
|
+
than accepting separate money fragments.
|
|
14
|
+
- Evaluate safely separated semicolon members independently and validate complete
|
|
15
|
+
tight comma groups before primary abbreviation/name admission. Keep ordinary
|
|
16
|
+
spaced prose and genuine protected-source diagnostics unchanged.
|
|
17
|
+
- Add 65 reviewed uppercase initialisms (80 approved abbreviation spellings in
|
|
18
|
+
total, including existing aliases) with typed pronunciation tails. `SGK`
|
|
19
|
+
defaults to `se ge ka`; approved suffixes select `ke`/`ka` alternatives and
|
|
20
|
+
PDF's `fe`/`ef` alternative without silently canonicalizing the reading.
|
|
21
|
+
API/IP/HDMI use an explicit international `i` reading.
|
|
22
|
+
- Recognize guarded no-space abbreviation lists and trailing colon/period
|
|
23
|
+
punctuation while protecting unknown prose, identifiers, electronic text and
|
|
24
|
+
canonical Roman intent.
|
|
25
|
+
- Recognize compact quantities, supported spaced currency symbols, validated
|
|
26
|
+
space-grouped money, additional percent positions and spaced contextual ranges.
|
|
27
|
+
Validation remains exact; whole-span ownership is the intended contract.
|
|
28
|
+
- Add numeric-context `°C` (`derece Santigrat`), `V`, `kW`, `kWh` and `GB` with
|
|
29
|
+
validated case suffixes, plus explicit capitalization aliases for doctor,
|
|
30
|
+
professor and doçent titles.
|
|
31
|
+
- Support fixed `DD/MM/YYYY` with a date cue or whole Date hint. Bare/invalid
|
|
32
|
+
slash notation remains literal under Fallback; clock seconds remain unsupported.
|
|
33
|
+
- Preserve smart double quotes, clearly paired single quotes and unambiguous
|
|
34
|
+
quantity-list punctuation without confusing decimals or suffix apostrophes.
|
|
35
|
+
Unknown uppercase prose such as `ABC` stays verbatim in every policy;
|
|
36
|
+
protected identifiers and recognized Roman-looking notation keep their rules.
|
|
37
|
+
- Add 35 reviewed foreign-name speech aliases with 47 exact keys, including
|
|
38
|
+
`Claude`, `ChatGPT`, `GitHub Copilot` and `Visual Studio Code`. They are primary
|
|
39
|
+
readings under every policy, with explicit case aliases, bounded phrases and
|
|
40
|
+
validated Turkish case suffixes; unknown spellings are not guessed.
|
|
41
|
+
`EMA Lightning`, `ema lightning` and `ema-lightning` read as `ema laytning`.
|
|
42
|
+
- Add `SegmentKind::Pronunciation`, `FallbackClass::Pronunciation`, Python
|
|
43
|
+
`"pronunciation"` labels and primary rule ID `pronunciation.name`.
|
|
44
|
+
- Reorganize internal modules by responsibility without changing public import
|
|
45
|
+
paths or existing enum/Serde tags. Keep thematic lexical definitions in logical
|
|
46
|
+
order with shared compile-time static indexes for borrowed lookup.
|
|
47
|
+
- Expand the ordered policy-contract catalog to 179 cases; the earlier 170 remain
|
|
48
|
+
an exact prefix. Rust tests/benchmarks share its loader, and Python
|
|
49
|
+
tests/measurements/verification cover every catalog input. Keep these
|
|
50
|
+
measurements separate from the original frozen benchmark corpora and aggregates.
|
|
51
|
+
|
|
52
|
+
The previously reviewed ownership, list-admission and numeric-scanning gaps are
|
|
53
|
+
covered by [review regression tests](docs/normalization.md#reviewed-boundary-regressions-050),
|
|
54
|
+
not treated as supported syntax or relaxed contracts.
|
|
55
|
+
|
|
56
|
+
### Migration
|
|
57
|
+
|
|
58
|
+
Core, private Rust/Python companion and Python distribution versions are 0.5.0.
|
|
59
|
+
Public signatures, result/diagnostic fields, options, policy defaults, limits
|
|
60
|
+
and dependency pins are unchanged. The new enum variants were
|
|
61
|
+
appended without reordering existing values. Adding variants to these exhaustive
|
|
62
|
+
public enums is a **source-breaking change for existing exhaustive Rust matches**,
|
|
63
|
+
which must handle `SegmentKind::Pronunciation` and `FallbackClass::Pronunciation`.
|
|
64
|
+
Closed serialized schemas/allowlists must also accept `"Pronunciation"`.
|
|
65
|
+
Python segment kinds and fallback attempted classes use `"pronunciation"`. See
|
|
66
|
+
[diagnostics and serialization](docs/fallback.md#diagnostics-and-serialization).
|
|
67
|
+
|
|
68
|
+
The expanded recognition is a deliberate behavior
|
|
69
|
+
change: previously unresolved forms may resolve, Reject may succeed, and
|
|
70
|
+
fallback counts/readings may change. Fragment hints inside recognized compounds
|
|
71
|
+
are invalid. Compact strings matching an approved quantity are treated as
|
|
72
|
+
quantities, not opaque codes. Review output snapshots, diagnostic-dependent logic
|
|
73
|
+
and hint ranges. Approved initialisms previously left verbatim now receive
|
|
74
|
+
primary Abbreviation segments. Their unmatched suffixes produce structured
|
|
75
|
+
issues (or Reject errors) instead of being accepted as ordinary prose.
|
|
76
|
+
Exact approved foreign names now receive primary Pronunciation segments even
|
|
77
|
+
without context: `Apple` and `Rust` are aliases, while lowercase `apple` and
|
|
78
|
+
`rust` remain prose. Recognized names with wrong suffixes retain a whole-span
|
|
79
|
+
issue under Preserve, fail under Reject, or receive literal Fallback rather than
|
|
80
|
+
a repaired alias. Review casing-sensitive snapshots and segment-kind consumers.
|
|
81
|
+
No spelling override, global casing/whitespace rewrite, rounding or currency
|
|
82
|
+
conversion is added. See the [normalization reference](docs/normalization.md)
|
|
83
|
+
for exact boundaries. Speech aliases are Turkish-readable text, not phonemes or
|
|
84
|
+
evidence of speech-model quality.
|
|
85
|
+
|
|
86
|
+
## 0.4.0 - 2026-10-03
|
|
87
|
+
|
|
88
|
+
Opt into source faithful fallback with Python's `ambiguity_policy="fallback"`
|
|
89
|
+
or Rust's `AmbiguityPolicy::Fallback`. Existing valid readings and hints keep
|
|
90
|
+
precedence. Preserve remains the default, and Preserve/Reject behavior is unchanged.
|
|
91
|
+
|
|
92
|
+
Fallback handles ambiguous formats, identifiers and otherwise unhandled symbols.
|
|
93
|
+
It returns `complete=true` with separate `fallbacks` diagnostics and a derived
|
|
94
|
+
`fallback_used` getter/property. Invalid dates or accounts are read as written,
|
|
95
|
+
not repaired or certified. Input/hint errors, cancellation and resource limits
|
|
96
|
+
remain real errors.
|
|
97
|
+
|
|
98
|
+
Rust adds fallback enum variants and diagnostic types. Optional Serde results
|
|
99
|
+
now include `fallbacks` and `fallback_used`. Python exposes frozen diagnostic
|
|
100
|
+
records; its `fallback_used` property is not a stored dataclass field.
|
|
101
|
+
Update exhaustive Rust matches and strict serialized schemas as needed.
|
|
102
|
+
See the [fallback contract](docs/fallback.md).
|
|
103
|
+
|
|
104
|
+
## 0.3.0
|
|
105
|
+
|
|
106
|
+
First registry release of the shared Rust engine and typed Python binding.
|
|
107
|
+
Both distributions are named `normalizer-tr`, imported as `normalizer_tr`.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Use minimal synthetic examples when reporting bugs: written input, expected
|
|
4
|
+
spoken text, actual completeness/issues, options/hints, revision and environment.
|
|
5
|
+
Do not include credentials, real account identifiers or private customer text.
|
|
6
|
+
|
|
7
|
+
## Set up
|
|
8
|
+
|
|
9
|
+
The release toolchain is Rust 1.99.0; the declared minimum is 1.94 and is tested
|
|
10
|
+
separately. The toolchain file includes rustfmt/Clippy. Python release tests
|
|
11
|
+
cover ordinary CPython 3.11–3.14 on the selected Windows/Linux/macOS platforms.
|
|
12
|
+
On Windows, install the MSVC C++ build tools.
|
|
13
|
+
|
|
14
|
+
```powershell
|
|
15
|
+
git clone https://github.com/erdemtuna/normalizer-tr.git
|
|
16
|
+
Set-Location normalizer-tr
|
|
17
|
+
cargo test --locked
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For Python development:
|
|
21
|
+
|
|
22
|
+
```powershell
|
|
23
|
+
py -3.13 -m venv .venv
|
|
24
|
+
.\.venv\Scripts\python.exe -m pip install -r .\bindings\python\requirements-dev.txt -c .\bindings\python\constraints.lock
|
|
25
|
+
.\.venv\Scripts\python.exe -m pip install .\bindings\python
|
|
26
|
+
.\.venv\Scripts\python.exe -m pytest .\bindings\python\tests -q
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Core/binding development needs no Torch, model files or credentials.
|
|
30
|
+
|
|
31
|
+
## Code layout
|
|
32
|
+
|
|
33
|
+
| Module | Responsibility |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `src/api` | Public contract behind crate-root re-exports |
|
|
36
|
+
| `src/classify` | Fixed reader priority, validation and whole-span claims; `scan` separates tokenization/indexing, punctuation and signals |
|
|
37
|
+
| `src/domain` | Validated numeric, quantity, temporal, electronic and identifier values |
|
|
38
|
+
| `src/domain/lexicon` | Approved abbreviation/name catalogs and shared compile-time lookup indexes; typed spoken tails remain in the domain |
|
|
39
|
+
| `src/notation` | Shared written-form helpers, explicit character names and noncertifying source surfaces |
|
|
40
|
+
| `src/interpretation.rs` | Neutral findings retaining their family, original issue and prevalidated alternatives |
|
|
41
|
+
| `src/resolution` | Static policy selection; `fallback` renders alternatives, ordered literals and code-point strategies with bounded emission |
|
|
42
|
+
| `src/numerals.rs`, `src/morphology.rs`, `src/verbalize.rs` | Exact rendering and spoken-tail metadata |
|
|
43
|
+
| `src/source_map.rs` | NFC recognition mapped to original UTF-8/grapheme coordinates |
|
|
44
|
+
| `src/resources.rs` | Immutable patterns validated and cached once, not input/result memoization |
|
|
45
|
+
| `src/pipeline.rs` | Source composition, diagnostics, adjacency padding and allocation budgets; aggregate Reject after engineering checks |
|
|
46
|
+
|
|
47
|
+
Classification/domain code does not depend on the renderer. Source date/time
|
|
48
|
+
surfaces do not relax validated domain constructors. Borrowed literal parts
|
|
49
|
+
share exact numeric and approved-label helpers; the fallback emitter checks
|
|
50
|
+
controls and capacity during traversal. `src/classify/symbols.rs` supplements
|
|
51
|
+
only unclaimed graphemes in Fallback. Python calls this engine without duplicating
|
|
52
|
+
language rules.
|
|
53
|
+
|
|
54
|
+
`src/domain/lexicon/abbreviations.rs` is the abbreviation catalog entry point.
|
|
55
|
+
It owns default and alternate Lexemes with typed source/target tails. The parent
|
|
56
|
+
lexicon validates suffixes and selects a reading; scanners use approved bases
|
|
57
|
+
only for source boundaries. Keep new names out of scanner, rendering and Python
|
|
58
|
+
special cases. Definitions live in thematic `titles`, `civic`, `education`,
|
|
59
|
+
`finance` and `technology` modules; maintain them in logical order, not alphabetical
|
|
60
|
+
order. `src/domain/lexicon/static_index.rs` combines the groups at compile time
|
|
61
|
+
for allocation-free binary lookup.
|
|
62
|
+
Test global key uniqueness, index coverage and unambiguous variant suffixes.
|
|
63
|
+
|
|
64
|
+
`src/domain/lexicon/pronunciations.rs` owns the exact foreign-name catalog,
|
|
65
|
+
grouped into `ai`, `developer` and `consumer`. It shares the static-index helper;
|
|
66
|
+
bounded phrase candidates are borrowed from that index. Keep approved spellings,
|
|
67
|
+
text aliases and typed suffix tails together. `src/classify/readers/pronunciation.rs`
|
|
68
|
+
claims the longest exact phrase after whole electronic recognition, without
|
|
69
|
+
guessing casing or meanings. Test all approved case families, invalid suffix
|
|
70
|
+
ownership, mixed prose, protected identifiers, phrase boundaries and original
|
|
71
|
+
Unicode coordinates. Text goldens are not speech-model/audio validation.
|
|
72
|
+
|
|
73
|
+
The scanner indexes numeric-run ends once for bounded money lookahead and
|
|
74
|
+
distinguishes paired quotation boundaries from suffix apostrophes. Keep
|
|
75
|
+
recognition separate from strict value validation and share typed label metadata.
|
|
76
|
+
Its incremental piece signals and complete tight-list admission stay separate
|
|
77
|
+
from domain parsing and rendering. Rejecting a group must not invent candidates
|
|
78
|
+
or hide genuine unresolved findings; source admission belongs with boundary claims.
|
|
79
|
+
|
|
80
|
+
## Change rules and tests
|
|
81
|
+
|
|
82
|
+
Add positive, negative and mixed-sentence tests. Assert completeness, issue
|
|
83
|
+
scope and byte ranges as well as text. Preserve matched-invalid compounds
|
|
84
|
+
instead of rewriting their fragments. Reuse exact-number/morphology helpers;
|
|
85
|
+
do not introduce unsafe Rust, floating-point money, global lowercasing,
|
|
86
|
+
emitted-text reparsing or result caches. Review deliberate reading changes
|
|
87
|
+
separately from refactors; do not regenerate fixtures just to pass.
|
|
88
|
+
Fallback must not change successful primary readings or Preserve/Reject
|
|
89
|
+
outcomes, silently drop symbols, certify invalid dates/accounts, or mask
|
|
90
|
+
controls/limit errors as preservation. Add its handled reasons to `fallbacks`,
|
|
91
|
+
not unresolved `issues`; assert that completion, provenance and source
|
|
92
|
+
partitions agree. See [the fallback contract](docs/fallback.md).
|
|
93
|
+
|
|
94
|
+
`tests/fixtures/policy-contract.json` is an ordered catalog of logical groups
|
|
95
|
+
under `tests/fixtures/policy-contract/`. Rust tests and benchmarks share a
|
|
96
|
+
compiled fixture loader; installed-Python tests and verification consume the
|
|
97
|
+
same catalog. Add cross-feature cases and exercise Preserve, Reject and Fallback
|
|
98
|
+
independently. Do not alter the frozen benchmark inputs/order to improve an aggregate.
|
|
99
|
+
The catalog currently has 179 cases; the earlier 170 remain an exact prefix.
|
|
100
|
+
`tests/support/policy_contract.rs` supplies the Rust loader; Python consumers
|
|
101
|
+
flatten the files in catalog order and fingerprint every input. The report key
|
|
102
|
+
`expanded_coverage_measurement` is retained for compatibility, not a second
|
|
103
|
+
fixture suite. Fixture origins and rights are recorded in
|
|
104
|
+
[data provenance](src/data/provenance.md).
|
|
105
|
+
|
|
106
|
+
## Checks
|
|
107
|
+
|
|
108
|
+
```powershell
|
|
109
|
+
cargo fmt --all --check
|
|
110
|
+
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
|
|
111
|
+
cargo test --locked --all-features
|
|
112
|
+
cargo doc --locked --no-deps --all-features
|
|
113
|
+
.\.venv\Scripts\python.exe -m ruff check bindings\python benches scripts
|
|
114
|
+
.\.venv\Scripts\python.exe -m ruff format --check bindings\python benches scripts
|
|
115
|
+
.\.venv\Scripts\python.exe -m mypy bindings\python\python --check-untyped-defs
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Rebuild/reinstall the binding after native/facade changes before running its
|
|
119
|
+
tests. CI also checks default/no-default Rust configurations and installed-wheel
|
|
120
|
+
tests, without models.
|
|
121
|
+
|
|
122
|
+
## Full verification
|
|
123
|
+
|
|
124
|
+
For full local package/consumer/audit/performance verification, provision:
|
|
125
|
+
|
|
126
|
+
```powershell
|
|
127
|
+
cargo install cargo-audit --version 0.22.2 --locked --root .\target\audit-tool
|
|
128
|
+
git clone https://github.com/RustSec/advisory-db.git .\target\advisory-db
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
From a clean committed checkout, use a new absolute output directory:
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
$python = (Resolve-Path .\.venv\Scripts\python.exe).Path
|
|
135
|
+
$output = Join-Path $env:TEMP 'normalizer-tr-verification-01'
|
|
136
|
+
.\scripts\verify.ps1 -PythonPath $python -OutputDirectory $output
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Optional `-RustupHome <absolute-isolated-path>` selects an existing isolated
|
|
140
|
+
toolchain. Keep the output/environment path short on Windows to avoid
|
|
141
|
+
path-length limits. Outputs include logs, packages, consumers and a checksum manifest.
|
|
142
|
+
See [PERFORMANCE.md](PERFORMANCE.md) for host-specific timing limits.
|
|
143
|
+
|
|
144
|
+
## Releasing
|
|
145
|
+
|
|
146
|
+
Maintain [CHANGELOG.md](CHANGELOG.md): leave changes under Unreleased until the
|
|
147
|
+
next version and release date are agreed. Before publishing, update core/binding
|
|
148
|
+
versions consistently and finalize that entry without rewriting past releases.
|
|
149
|
+
Mark preparation-only entries clearly, then finalize release wording before
|
|
150
|
+
tagging. Versioned source and build artifacts do not imply registry availability;
|
|
151
|
+
confirm each registry's publication independently.
|
|
152
|
+
Platform requirements are in the [Python guide](bindings/python/README.md#install).
|
|
153
|
+
|
|
154
|
+
[release.yml](.github/workflows/release.yml) is manually dispatched. Its default
|
|
155
|
+
is build/test only: 16 wheels, a tested source distribution, the core archive and
|
|
156
|
+
an exact checksum manifest. No PR or ordinary push publishes packages.
|
|
157
|
+
|
|
158
|
+
PyPI publication requires a matching `v<version>` tag, `publish=true`, the `pypi`
|
|
159
|
+
environment and its configured Trusted Publisher. Only the publish job has OIDC
|
|
160
|
+
permission; no persistent PyPI token is stored.
|
|
161
|
+
|
|
162
|
+
Publish the core to crates.io using owner-configured Cargo authentication, from
|
|
163
|
+
the same clean revision and byte-identical reviewed archive. The internal
|
|
164
|
+
Rust/Python companion keeps `publish = false`. Verify fresh registry consumers
|
|
165
|
+
and live checksums afterward.
|
|
166
|
+
|
|
167
|
+
Never paste credentials into chat, command arguments or source. If an upload has
|
|
168
|
+
an uncertain result, inspect the registry before retrying. Do not reuse a version
|
|
169
|
+
for different artifacts. Registry publishing is owner-controlled after
|
|
170
|
+
built-artifact verification, never an untrusted PR action.
|
|
171
|
+
|
|
172
|
+
Owned contributions are Apache-2.0; retain third-party notices. Keep credentials,
|
|
173
|
+
models, integrations, private history, audio, wheels, environments and reports
|
|
174
|
+
outside the public source/packages and Git.
|
|
@@ -121,7 +121,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
|
121
121
|
|
|
122
122
|
[[package]]
|
|
123
123
|
name = "normalizer-tr"
|
|
124
|
-
version = "0.
|
|
124
|
+
version = "0.5.0"
|
|
125
125
|
dependencies = [
|
|
126
126
|
"proptest",
|
|
127
127
|
"regex",
|
|
@@ -133,7 +133,7 @@ dependencies = [
|
|
|
133
133
|
|
|
134
134
|
[[package]]
|
|
135
135
|
name = "normalizer-tr-python"
|
|
136
|
-
version = "0.
|
|
136
|
+
version = "0.5.0"
|
|
137
137
|
dependencies = [
|
|
138
138
|
"normalizer-tr",
|
|
139
139
|
"pyo3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "normalizer-tr"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
rust-version = "1.94"
|
|
6
6
|
description = "Bounded Turkish text-to-speech normalization with original-source diagnostics"
|
|
@@ -9,7 +9,7 @@ repository = "https://github.com/erdemtuna/normalizer-tr"
|
|
|
9
9
|
keywords = ["turkish", "tts", "normalization", "text-to-speech"]
|
|
10
10
|
categories = ["text-processing"]
|
|
11
11
|
publish = ["crates-io"]
|
|
12
|
-
include = ["/src/**", "/tests/**", "/examples/**", "/benches/**", "/docs/**", "/Cargo.toml", "/Cargo.lock", "/rust-toolchain.toml", "/README.md", "/CONTRIBUTING.md", "/PERFORMANCE.md", "/LICENSE", "/THIRD_PARTY_NOTICES.md"]
|
|
12
|
+
include = ["/src/**", "/tests/**", "/examples/**", "/benches/**", "/docs/**", "/Cargo.toml", "/Cargo.lock", "/rust-toolchain.toml", "/README.md", "/CHANGELOG.md", "/CONTRIBUTING.md", "/PERFORMANCE.md", "/LICENSE", "/THIRD_PARTY_NOTICES.md"]
|
|
13
13
|
|
|
14
14
|
[package.metadata.docs.rs]
|
|
15
15
|
all-features = true
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Performance and measurement
|
|
2
|
+
|
|
3
|
+
The development target is warm release Rust **p95 < 1 ms**, separately for
|
|
4
|
+
short (1-256) and medium (257-1024) original UTF-8 byte cohorts. The snapshot below
|
|
5
|
+
met this host-specific target; it is not a universal SLA, a hosted CI timing
|
|
6
|
+
gate or an end-to-end speech-generation guarantee.
|
|
7
|
+
|
|
8
|
+
The public inputs are in `benches/corpus.json` and `benches/intent-corpus.json`.
|
|
9
|
+
Do not shrink the corpus, weaken validation or remove slow cases to claim
|
|
10
|
+
improvement. Current semantic outcomes are checked independently by the
|
|
11
|
+
characterization and class tests.
|
|
12
|
+
|
|
13
|
+
Passing those frozen cohorts does not cover every scaling path. The
|
|
14
|
+
[reviewed boundary regressions](docs/normalization.md#reviewed-boundary-regressions-050)
|
|
15
|
+
also exercise single malformed numeric tokens and cooperative control checks.
|
|
16
|
+
Cooperative deadlines are not hard latency guarantees.
|
|
17
|
+
|
|
18
|
+
## Reproduce
|
|
19
|
+
|
|
20
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) to provision the isolated Python tools
|
|
21
|
+
and advisory checker/database. From a clean committed Windows checkout:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
.\scripts\verify.ps1 -PythonPath <absolute-build-python> -RustupHome <optional-isolated-rustup> -OutputDirectory <new-absolute-directory>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Omit `-RustupHome` when using the normal installed toolchain. The output path
|
|
28
|
+
must be new; reports and packages are never overwritten.
|
|
29
|
+
|
|
30
|
+
The serial command verifies source/tests/docs, clean packages and external
|
|
31
|
+
consumers, then emits `manifest.json` and `summary.txt`. The manifest links
|
|
32
|
+
source HEAD, current normalizer identity, compiler/build/host context, corpus/
|
|
33
|
+
native-binary hashes, stage results, Cargo VCS and exact package checksums.
|
|
34
|
+
It does not commit, publish, run models or change global tools/settings.
|
|
35
|
+
Dependent Cargo stages are serial to avoid artifact races.
|
|
36
|
+
|
|
37
|
+
For the native sampler alone, use a new output path:
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
cargo bench --locked --features serde --bench latency -- --output <new-absolute-report.json>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Native methodology
|
|
44
|
+
|
|
45
|
+
- `Instant` measures 10,000 individual calls per cohort after 2,000 warmup calls.
|
|
46
|
+
- A deterministic mix interleaves Preserve/Reject policy cases; outcomes are
|
|
47
|
+
checked before and after sampling.
|
|
48
|
+
- Timings include owned result/error disposal, not just recognition.
|
|
49
|
+
- Nearest-rank p50/p95/p99/max and per-class/policy counts are reported.
|
|
50
|
+
- Every outlier is retained. Clock overhead is reported, not subtracted.
|
|
51
|
+
- Three repetitions are retained by the full verifier; results are not replaced
|
|
52
|
+
by a batched average or confidence interval.
|
|
53
|
+
|
|
54
|
+
The separate `fallback_measurement` uses the same frozen
|
|
55
|
+
cohorts, 2,000 warmups and 10,000 individually timed calls per cohort.
|
|
56
|
+
The original Preserve/Reject aggregate/order/corpus are unchanged. Fallback
|
|
57
|
+
results are not semantically equivalent to preservation/rejection, so do not
|
|
58
|
+
mix their samples into that aggregate or label differences as an optimization.
|
|
59
|
+
Python reports follow the same separation, including fallback-only concurrent
|
|
60
|
+
calls. No new universal latency promise is made for amplified code-point output.
|
|
61
|
+
|
|
62
|
+
Policy-contract measurements retain the existing `expanded_coverage_measurement`
|
|
63
|
+
JSON key for report compatibility without changing the frozen inputs, original
|
|
64
|
+
aggregate/order or existing report fields. Reviewed cases come from
|
|
65
|
+
`tests/fixtures/policy-contract.json`, shared with Rust/Python tests.
|
|
66
|
+
It is an ordered catalog of money, quantity, lexical, punctuation, date,
|
|
67
|
+
unresolved, context and compound-boundary fixture files. Case order and expected
|
|
68
|
+
outcomes of existing cases are preserved; initialism, pronunciation-variant and
|
|
69
|
+
abbreviation-boundary groups, then AI/developer/consumer name and pronunciation-
|
|
70
|
+
boundary groups, then review regression and EMA Lightning groups are appended.
|
|
71
|
+
The catalog now has 179 cases with the earlier 170 as an exact prefix. Python
|
|
72
|
+
fingerprints and manifests cover the catalog and every referenced file rather
|
|
73
|
+
than just the catalog itself.
|
|
74
|
+
Each short/medium policy cohort is separate, with 2,000 warmups and 10,000 calls.
|
|
75
|
+
Golden outcomes are checked before/after timing; class counts and exact inputs
|
|
76
|
+
are validated by the verifier. Native reports also retain 4/16/32 KiB grouping,
|
|
77
|
+
quotation/list, single malformed comma/dot tokens, mixed quantity lists,
|
|
78
|
+
name/phrase/prefix-miss/rejected-list and decomposed-Unicode
|
|
79
|
+
scaling diagnostics. These workloads are not exhaustive complexity checks.
|
|
80
|
+
|
|
81
|
+
The first process initialization is recorded separately from 100 later cached
|
|
82
|
+
same-process constructor calls. Those later calls are **not cold starts**.
|
|
83
|
+
Large 4/16/32 KiB inputs, maximum hints, candidate/result errors and long
|
|
84
|
+
identifiers are separate scaling diagnostics, not 1 ms guarantees.
|
|
85
|
+
|
|
86
|
+
## Python and measurement limits
|
|
87
|
+
|
|
88
|
+
Installed Python measurements include public argument validation, native Rust
|
|
89
|
+
work, marshaling and result/error disposal. Eight-thread public-call timings
|
|
90
|
+
are separate from the Rust target and from model/worker/audio costs.
|
|
91
|
+
Native allocation/peak instrumentation is unavailable; no inferred allocation
|
|
92
|
+
counts or peak-memory claims are made.
|
|
93
|
+
|
|
94
|
+
Record host/build context without changing power settings or stopping other
|
|
95
|
+
work. Shared-host load varies; GitHub-hosted runners and other hardware are not
|
|
96
|
+
assumed equivalent.
|
|
97
|
+
|
|
98
|
+
## Development measurement snapshot
|
|
99
|
+
|
|
100
|
+
This comparison used the captured feature implementation
|
|
101
|
+
[`a4e3055`](https://github.com/erdemtuna/normalizer-tr/commit/a4e3055) and the module
|
|
102
|
+
refactor subsequently committed as
|
|
103
|
+
[`0b3eb5d`](https://github.com/erdemtuna/normalizer-tr/commit/0b3eb5d).
|
|
104
|
+
Measurements were collected before the refactor commit, not from a clean release
|
|
105
|
+
revision. Both builds reported `normalizer-tr/0.4.0`; that identity alone does
|
|
106
|
+
not distinguish these source snapshots.
|
|
107
|
+
|
|
108
|
+
This historical snapshot predates the initialism and foreign-name additions;
|
|
109
|
+
it is not a measurement of the 0.5.0 release revision.
|
|
110
|
+
|
|
111
|
+
Host: AMD Ryzen AI 7 PRO 350, 8 cores / 16 logical processors, Windows 11
|
|
112
|
+
Enterprise 26200. Native builds used Rust 1.99.0 x64 MSVC, optimized bench
|
|
113
|
+
profile with `serde`; installed-wheel measurements used CPython 3.13.15.
|
|
114
|
+
Sampling used the frozen original Preserve/Reject cohorts and methodology above,
|
|
115
|
+
serially on the same shared host.
|
|
116
|
+
|
|
117
|
+
| Measurement / cohort | Baseline p95, microseconds | Refactored p95, microseconds |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| Native short, three repetitions | 27.4, 27.7, 22.9 | 27.1, 40.2, 20.8 |
|
|
120
|
+
| Native medium, three repetitions | 196.7, 245.3, 187.5 | 185.9, 210.1, 194.6 |
|
|
121
|
+
| Installed Python short, one repetition | 56.6 | 50.3 |
|
|
122
|
+
| Installed Python medium, one repetition | 232.3 | 204.2 |
|
|
123
|
+
|
|
124
|
+
All native repetitions met the host-specific target. Alternating comparison
|
|
125
|
+
runs retained class-level variability; these values do not establish a universal
|
|
126
|
+
speedup, identical code generation or a guarantee for amplified fallback output.
|
|
127
|
+
Frozen inputs and full benchmark outcomes were unchanged.
|
|
128
|
+
|
|
129
|
+
Raw reports and packages remain local development artifacts outside Git, not
|
|
130
|
+
published release evidence. A clean-revision full verification remains required
|
|
131
|
+
for release. Optimize measured bottlenecks or regressions; once the target is
|
|
132
|
+
met, prioritize clarity over additional performance machinery.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: normalizer-tr
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Programming Language :: Python :: 3
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
10
|
+
Classifier: Programming Language :: Rust
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Operating System :: MacOS
|
|
14
|
+
Classifier: Topic :: Text Processing
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
License-File: LICENSE-PROJECT
|
|
17
|
+
License-File: THIRD_PARTY_NOTICES-PROJECT.md
|
|
18
|
+
License-File: licenses/aho-corasick-1.1.5/COPYING
|
|
19
|
+
License-File: licenses/aho-corasick-1.1.5/LICENSE-MIT
|
|
20
|
+
License-File: licenses/heck-0.5.0/LICENSE-APACHE
|
|
21
|
+
License-File: licenses/heck-0.5.0/LICENSE-MIT
|
|
22
|
+
License-File: licenses/libc-0.2.189/LICENSE-APACHE
|
|
23
|
+
License-File: licenses/libc-0.2.189/LICENSE-MIT
|
|
24
|
+
License-File: licenses/memchr-2.8.3/COPYING
|
|
25
|
+
License-File: licenses/memchr-2.8.3/LICENSE-MIT
|
|
26
|
+
License-File: licenses/portable-atomic-1.15.0/LICENSE-APACHE
|
|
27
|
+
License-File: licenses/portable-atomic-1.15.0/LICENSE-MIT
|
|
28
|
+
License-File: licenses/proc-macro2-1.0.107/LICENSE-APACHE
|
|
29
|
+
License-File: licenses/proc-macro2-1.0.107/LICENSE-MIT
|
|
30
|
+
License-File: licenses/pyo3-0.29.3/LICENSE-APACHE
|
|
31
|
+
License-File: licenses/pyo3-0.29.3/LICENSE-MIT
|
|
32
|
+
License-File: licenses/pyo3-build-config-0.29.3/LICENSE-APACHE
|
|
33
|
+
License-File: licenses/pyo3-build-config-0.29.3/LICENSE-MIT
|
|
34
|
+
License-File: licenses/pyo3-ffi-0.29.3/LICENSE-APACHE
|
|
35
|
+
License-File: licenses/pyo3-ffi-0.29.3/LICENSE-MIT
|
|
36
|
+
License-File: licenses/pyo3-macros-0.29.3/LICENSE-APACHE
|
|
37
|
+
License-File: licenses/pyo3-macros-0.29.3/LICENSE-MIT
|
|
38
|
+
License-File: licenses/pyo3-macros-backend-0.29.3/LICENSE-APACHE
|
|
39
|
+
License-File: licenses/pyo3-macros-backend-0.29.3/LICENSE-MIT
|
|
40
|
+
License-File: licenses/quote-1.0.47/LICENSE-APACHE
|
|
41
|
+
License-File: licenses/quote-1.0.47/LICENSE-MIT
|
|
42
|
+
License-File: licenses/regex-1.13.1/LICENSE-APACHE
|
|
43
|
+
License-File: licenses/regex-1.13.1/LICENSE-MIT
|
|
44
|
+
License-File: licenses/regex-automata-0.4.18/LICENSE-APACHE
|
|
45
|
+
License-File: licenses/regex-automata-0.4.18/LICENSE-MIT
|
|
46
|
+
License-File: licenses/regex-syntax-0.8.11/LICENSE-APACHE
|
|
47
|
+
License-File: licenses/regex-syntax-0.8.11/LICENSE-MIT
|
|
48
|
+
License-File: licenses/rust-std-1.99.0/COPYRIGHT-library.html
|
|
49
|
+
License-File: licenses/rust-std-1.99.0/LICENSE-APACHE
|
|
50
|
+
License-File: licenses/rust-std-1.99.0/LICENSE-MIT
|
|
51
|
+
License-File: licenses/syn-2.0.119/LICENSE-APACHE
|
|
52
|
+
License-File: licenses/syn-2.0.119/LICENSE-MIT
|
|
53
|
+
License-File: licenses/syn-3.0.6/LICENSE-APACHE
|
|
54
|
+
License-File: licenses/syn-3.0.6/LICENSE-MIT
|
|
55
|
+
License-File: licenses/target-lexicon-0.13.5/LICENSE
|
|
56
|
+
License-File: licenses/tinyvec-1.13.3/LICENSE-APACHE.md
|
|
57
|
+
License-File: licenses/tinyvec-1.13.3/LICENSE-MIT.md
|
|
58
|
+
License-File: licenses/tinyvec-1.13.3/LICENSE-ZLIB.md
|
|
59
|
+
License-File: licenses/unicode-ident-1.0.26/LICENSE-APACHE
|
|
60
|
+
License-File: licenses/unicode-ident-1.0.26/LICENSE-MIT
|
|
61
|
+
License-File: licenses/unicode-ident-1.0.26/LICENSE-UNICODE
|
|
62
|
+
License-File: licenses/unicode-normalization-0.1.25/LICENSE-APACHE
|
|
63
|
+
License-File: licenses/unicode-normalization-0.1.25/LICENSE-MIT
|
|
64
|
+
License-File: licenses/unicode-segmentation-1.13.3/LICENSE-APACHE
|
|
65
|
+
License-File: licenses/unicode-segmentation-1.13.3/LICENSE-MIT
|
|
66
|
+
Summary: Typed Python binding for the bounded Rust Turkish text normalizer
|
|
67
|
+
License-Expression: Apache-2.0
|
|
68
|
+
Requires-Python: >=3.11, <3.15
|
|
69
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
70
|
+
Project-URL: Issues, https://github.com/erdemtuna/normalizer-tr/issues
|
|
71
|
+
Project-URL: Repository, https://github.com/erdemtuna/normalizer-tr
|
|
72
|
+
|
|
73
|
+
# normalizer-tr
|
|
74
|
+
|
|
75
|
+
[](https://github.com/erdemtuna/normalizer-tr/actions/workflows/ci.yml)
|
|
76
|
+
|
|
77
|
+
Turkish text normalization for speech, with a Rust core and a typed Python API.
|
|
78
|
+
Convert numbers, money, dates, measurements and other supported notation into
|
|
79
|
+
spoken Turkish while preserving ordinary prose. Runs offline, without a speech
|
|
80
|
+
model or service. Decimal and money arithmetic is exact.
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
saat 09:30'da 5 kg malzeme ve %12,5'lik fark
|
|
84
|
+
→ saat dokuz otuzda beş kilogram malzeme ve yüzde on iki virgül beşlik fark
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Python
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
python -m pip install normalizer-tr
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from normalizer_tr import Normalizer
|
|
95
|
+
|
|
96
|
+
normalizer = Normalizer()
|
|
97
|
+
result = normalizer.normalize("25 TL; 5 kg")
|
|
98
|
+
assert result.normalized_text == "yirmi beş Türk lirası; beş kilogram"
|
|
99
|
+
assert result.complete
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Wheels support CPython 3.11 to 3.14 on Windows and Linux x64, and macOS
|
|
103
|
+
x64 and arm64. Compatible wheels need no Rust compiler.
|
|
104
|
+
[Platform requirements and source builds](https://github.com/erdemtuna/normalizer-tr/blob/main/bindings/python/README.md).
|
|
105
|
+
|
|
106
|
+
## Rust
|
|
107
|
+
|
|
108
|
+
Requires Rust 1.94 or newer. Add to `Cargo.toml`:
|
|
109
|
+
|
|
110
|
+
```toml
|
|
111
|
+
[dependencies]
|
|
112
|
+
normalizer-tr = "0.5"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```rust
|
|
116
|
+
use normalizer_tr::{NormalizeError, NormalizeOptions, Normalizer};
|
|
117
|
+
|
|
118
|
+
fn main() -> Result<(), NormalizeError> {
|
|
119
|
+
let normalizer = Normalizer::new()?;
|
|
120
|
+
let result = normalizer.normalize("25 TL; 5 kg", &NormalizeOptions::default())?;
|
|
121
|
+
assert_eq!(result.normalized_text(), "yirmi beş Türk lirası; beş kilogram");
|
|
122
|
+
assert!(result.complete());
|
|
123
|
+
Ok(())
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Reuse a `Normalizer` across calls. It is cloneable and `Send + Sync`.
|
|
128
|
+
Enable the optional `serde` feature to serialize results.
|
|
129
|
+
|
|
130
|
+
## Choose how to handle ambiguity
|
|
131
|
+
|
|
132
|
+
| Policy | Behavior |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `preserve` (default) | Keep unresolved spans as written. Return `complete=false` and `issues`. |
|
|
135
|
+
| `reject` | Return an error if any span is unresolved. |
|
|
136
|
+
| `fallback` | Render unresolved notation and symbols. Return handled assumptions in `fallbacks`. |
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
result = normalizer.normalize("1.234; AB12", ambiguity_policy="fallback")
|
|
140
|
+
assert result.normalized_text == "bin iki yüz otuz dört; a be bir iki"
|
|
141
|
+
assert result.complete and not result.issues
|
|
142
|
+
assert result.fallback_used
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
In Rust, set `NormalizeOptions.ambiguity_policy` to
|
|
146
|
+
`AmbiguityPolicy::Fallback` or `AmbiguityPolicy::Reject`.
|
|
147
|
+
|
|
148
|
+
Fallback prefers clear formats, then literal readings and named symbols, then
|
|
149
|
+
spoken Unicode codes. It does not correct invalid facts or certify identifiers.
|
|
150
|
+
Check `fallbacks` when those assumptions matter. Invalid input or hints,
|
|
151
|
+
cancellation and resource limits remain errors in every policy.
|
|
152
|
+
|
|
153
|
+
Hints provide explicit intent. All hint and diagnostic ranges are original
|
|
154
|
+
UTF-8 byte offsets, not character positions.
|
|
155
|
+
|
|
156
|
+
## Documentation
|
|
157
|
+
|
|
158
|
+
| Guide | Contents |
|
|
159
|
+
|---|---|
|
|
160
|
+
| [Rust API](https://docs.rs/normalizer-tr) | Types, methods and examples |
|
|
161
|
+
| [Python API](https://github.com/erdemtuna/normalizer-tr/blob/main/bindings/python/README.md) | Hints, errors, cancellation and building |
|
|
162
|
+
| [Normalization reference](https://github.com/erdemtuna/normalizer-tr/blob/main/docs/normalization.md) | Supported formats and boundaries |
|
|
163
|
+
| [Fallback](https://github.com/erdemtuna/normalizer-tr/blob/main/docs/fallback.md) | Reading strategies and diagnostics |
|
|
164
|
+
| [Contributing](https://github.com/erdemtuna/normalizer-tr/blob/main/CONTRIBUTING.md) | Setup, architecture and verification |
|
|
165
|
+
|
|
166
|
+
This is a pre 1.0 library with bounded coverage, not a universal pronunciation
|
|
167
|
+
engine. See [performance](https://github.com/erdemtuna/normalizer-tr/blob/main/PERFORMANCE.md) for measurements and
|
|
168
|
+
[changelog](https://github.com/erdemtuna/normalizer-tr/blob/main/CHANGELOG.md) for release status and migration notes.
|
|
169
|
+
|
|
170
|
+
The guides track repository behavior: expanded initialism coverage and
|
|
171
|
+
[foreign-name speech aliases](https://github.com/erdemtuna/normalizer-tr/blob/main/docs/normalization.md#approved-foreign-names)
|
|
172
|
+
are included in **0.5.0**. Review the changelog's migration notes before upgrading,
|
|
173
|
+
especially exhaustive Rust enum matches and strict serialized allowlists.
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
[Apache-2.0](https://github.com/erdemtuna/normalizer-tr/blob/main/LICENSE),
|
|
178
|
+
with [third party notices](https://github.com/erdemtuna/normalizer-tr/blob/main/THIRD_PARTY_NOTICES.md).
|
|
179
|
+
|
|
180
|
+
Thanks to [@canberk7](https://github.com/canberk7) for his contribution to fallback support.
|
|
181
|
+
|