We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8035ea9 commit febd46eCopy full SHA for febd46e
pythainlp/tokenize/newmm.py
@@ -82,11 +82,7 @@ def onecut(text, trie):
82
else: # skip น้อยที่สุด ที่เป็นไปได้
83
for i in range(p + 1, len(text)):
84
if i in allow_pos: # ใช้ tcc ด้วย
85
- ww = [
86
- w
87
- for w in trie.prefixes(text[i:])
88
- if (i + len(w) in allow_pos)
89
- ]
+ ww = [w for w in trie.prefixes(text[i:]) if (i + len(w) in allow_pos)]
90
ww = [w for w in ww if not PAT_TWOCHARS.match(w)]
91
m = PAT_ENG.match(text[i:])
92
if ww or m:
0 commit comments