diff --git a/gtts/tokenizer/symbols.py b/gtts/tokenizer/symbols.py index 1670360..17b3a62 100644 --- a/gtts/tokenizer/symbols.py +++ b/gtts/tokenizer/symbols.py @@ -6,7 +6,7 @@ 'prof', 'sr', 'st'] SUB_PAIRS = [ - ('M.', 'Monsieur') + ('Esq.', 'Esquire') ] ALL_PUNC = u"?!?!.,¡()[]¿…‥،;:—。,、:\n" diff --git a/gtts/tokenizer/tests/test_pre_processors.py b/gtts/tokenizer/tests/test_pre_processors.py index 368b9c2..8c6a428 100644 --- a/gtts/tokenizer/tests/test_pre_processors.py +++ b/gtts/tokenizer/tests/test_pre_processors.py @@ -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) diff --git a/news/197.bugfix b/news/197.bugfix new file mode 100644 index 0000000..659e39d --- /dev/null +++ b/news/197.bugfix @@ -0,0 +1 @@ +Changed default word-for-word pre-processor (``('M.', 'Monsieur')``) which would substitute any 'm.' for 'monsieur' (e.g. 'them.' became 'themonsieur') \ No newline at end of file