Skip to content

Commit

Permalink
Merge pull request pndurette#208 from pndurette/fix_issues
Browse files Browse the repository at this point in the history
Fix various open issues.
  • Loading branch information
pndurette committed Jan 1, 2020
2 parents c27db09 + 171bbf4 commit ad571ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gtts/tokenizer/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'prof', 'sr', 'st']

SUB_PAIRS = [
('M.', 'Monsieur')
('Esq.', 'Esquire')
]

ALL_PUNC = u"?!?!.,¡()[]¿…‥،;:—。,、:\n"
Expand Down
4 changes: 2 additions & 2 deletions gtts/tokenizer/tests/test_pre_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def test_abbreviations(self):
self.assertEqual(abbreviations(_in), _out)

def test_word_sub(self):
_in = "M. Bacon"
_out = "Monsieur Bacon"
_in = "Esq. Bacon"
_out = "Esquire Bacon"
self.assertEqual(word_sub(_in), _out)


Expand Down
1 change: 1 addition & 0 deletions news/197.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changed default word-for-word pre-processor (``('M.', 'Monsieur')``) which would substitute any 'm.' for 'monsieur' (e.g. 'them.' became 'themonsieur')

0 comments on commit ad571ab

Please sign in to comment.