diff --git a/alSentenceSplitting.py b/alSentenceSplitting.py index 70976f582956135a004ed723959af7344622939f..f39b5c3e3564eefe78efd13da70e658be9904695 100644 --- a/alSentenceSplitting.py +++ b/alSentenceSplitting.py @@ -90,7 +90,7 @@ def altok_split_sentences(s, lang, weak_sbound = 0, less_lists = 0, noxml = 0, a s = re.sub(r" ([:;:;]|)( +)", r" \1</s>\2<s>", s) elif re.search(r"^km(_|$)", lang): s = re.sub(r" ([។៕])( +)", r" \1</s>\2<s>", s) - elif re.search(r"^th(_|$)", lang):: + elif re.search(r"^th(_|$)", lang): pass else: s = re.sub(rf"([…\.:;\?\!])( +)([\"“â€\Ë] {maj.pattern}[^\"“â€\Ë<>]*[\.:;\?\!] [\"“â€\Ë])( +)({maj.pattern})", r"\1</s>\2<s>\3</s>\4<s>\5", s) # detection of sentences entirely surrounded by double quotes