Skip to content

Commit 1019489

Browse files
committed
Fixed _version2int bug
1 parent 6a9a3d4 commit 1019489

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pythainlp/corpus/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ def _version2int(v: str) -> int:
230230
"""
231231
X.X.X => X0X0X
232232
"""
233+
if '-' in v:
234+
v = v.split("-")[0]
233235
if v.endswith(".*"):
234236
v = v.replace(".*", ".0") # X.X.* => X.X.0
235237
v_list = v.split(".")

0 commit comments

Comments
 (0)