Whole file
rhasspy/gruut-ipa
The author described this change as “Add raw regexs, fix Czech phonemes”. It counts as a record because the checks below fail on the code as it stood at cd1a0c429 and pass on 2c5f98899, with nothing else changed between the two runs.
Projectrhasspy/gruut-ipa
Fix saved2020-12-04
Sharing licenceMIT · LICENSE
Change size+5 −0
What the code was meant to do, written into the code itself as a save note
Add raw regexs, fix Czech phonemes
The change
| 771 | 771 | for match_text, replace_text in sorted( | |
| 772 | 772 | self.ipa_map.items(), key=lambda kv: len(kv[0]), reverse=True | |
| 773 | 773 | ): | |
| 774 | + | if match_text.startswith(","): | |
| 775 | + | # Raw regex | |
| 776 | + | cases.append(match_text[1:]) | |
| 777 | + | continue | |
| 778 | + | ||
| 774 | 779 | num_extra = len(replace_text) - len(match_text) | |
| 775 | 780 | if (num_extra > 0) and replace_text.startswith(match_text): | |
| 776 | 781 | cases.append( |
The check that tells the two apart
fail→pass·tests/test_phonemes.py::PhonemesTestCase::test_split_dipthong
fail→pass·tests/test_phonemes.py::PhonemesTestCase::test_split_substring
Check file tests/test_phonemes.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itcd1a0c429996898e2deb5a0e3db27b6f51a52055
Broken version dated2020-11-19
Modulegruut_ipa.__init__
Units changedPhonemes
Fingerprint382078afe2743b83
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.