Skip to content

Commit f56e7d9

Browse files
authored
Merge pull request #1063 from PyThaiNLP/wannaphong/fix-newmm-safe
2 parents 9a9d11f + aecdd66 commit f56e7d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythainlp/tokenize/newmm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def segment(
182182
# try to break by space first
183183
space_idx = sample.rfind(" ")
184184
if space_idx >= 0:
185-
cut_pos = space_idx + 1
185+
cut_pos = space_idx + 1 + _TEXT_SCAN_BEGIN
186186
else:
187187
tokens = list(_onecut(sample, custom_dict))
188188
token_max_idx = 0

0 commit comments

Comments
 (0)