From b4d4f37c5b448791768b49a864621974e84bce57 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Tue, 8 Aug 2023 02:30:07 -0700 Subject: [PATCH] Fix incorrect passing of flags to re.split --- pythainlp/tokenize/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythainlp/tokenize/core.py b/pythainlp/tokenize/core.py index d72462672..39c59c706 100644 --- a/pythainlp/tokenize/core.py +++ b/pythainlp/tokenize/core.py @@ -413,7 +413,7 @@ def sent_tokenize( segments = segment(text) elif engine == "whitespace": - segments = re.split(r" +", text, re.U) + segments = re.split(r" +", text, flags=re.U) elif engine == "whitespace+newline": segments = text.split() elif engine == "tltk":