Repository navigation
Don't append a full stop after Hindi and Arabic sentence punctuation - #572
Open
ANDROIDHASSAN wants to merge 2 commits into
Open
ANDROIDHASSAN wants to merge 2 commits into
ANDROIDHASSAN wants to merge 2 commits into
Conversation
punc_norm in the multilingual model adds '.' unless the text ends in one of its sentence enders. The Devanagari danda (।) and the Arabic question mark (؟) were missing, so Hindi and Arabic input got a second full stop: 'मेरा नाम हसन है।' became 'मेरा नाम हसन है।.'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
punc_norminmtl_tts.pyappends.unless the text already ends in one of its sentence enders. Hindi and Arabic are supported languages, but their sentence punctuation was not in that set, so their input got a second stop:This adds the danda
।, double danda॥, Arabic question mark؟and Arabic comma،tosentence_enders, next to the CJK marks already there (the ASCII comma is already an ender, so the Arabic comma now behaves the same). All four characters are in the multilingual tokenizer's vocabulary, so the text now ends on the real punctuation token instead of an extra..Checked by running
punc_normfrom this branch on the inputs above.