From 1b1903bc0b60d3e685a706206440a5ad2cc4d82b Mon Sep 17 00:00:00 2001 From: Tim Mahrt Date: Wed, 20 Jul 2016 16:35:44 +0200 Subject: [PATCH] =?UTF-8?q?BUGFIX:=20Dental=20and=20Stop=20special=20keys?= =?UTF-8?q?=20don't=20match=20multichar=20sounds=20like=20t=CA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So 't' will be matched but not 'tʃ' --- pysle/isletool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysle/isletool.py b/pysle/isletool.py index 75cd7ee..728cb68 100644 --- a/pysle/isletool.py +++ b/pysle/isletool.py @@ -202,9 +202,9 @@ def _prepRESearchStr(matchStr, wordInitial='ok', wordFinal='ok', matchStr = matchStr.replace(charB, charA) # Replace special characters - replDict = {"D": u"[tdsz]", # dentals + replDict = {"D": u"(?:t(?!ʃ)|d(?!ʒ)|[sz])", # dentals "F": u"[ʃʒfvszɵðh]", # fricatives - "S": u"[pbtdkg]", # stops + "S": u"(?:t(?!ʃ)|d(?!ʒ)|[pbkg])", # stops "N": u"[nmŋ]", # nasals "R": u"[rɝɚ]", # rhotics "V": u"(?:aʊ|ei|oʊ|ɑɪ|ɔi|[iuæɑɔəɛɪʊʌ]):?", # vowels