Skip to content

Commit 947c7be

Browse files
committed
Change pythainlp.tools.misspell to pythainlp.tools.misspell.misspell
1 parent 354c7b9 commit 947c7be

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

docs/api/tools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Modules
1010
.. autofunction:: get_full_data_path
1111
.. autofunction:: get_pythainlp_data_path
1212
.. autofunction:: get_pythainlp_path
13-
.. autofunction:: misspell
13+
.. autofunction:: pythainlp.tools.misspell.misspell

pythainlp/tools/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"get_full_data_path",
55
"get_pythainlp_data_path",
66
"get_pythainlp_path",
7-
"misspell",
87
]
98

109
from pythainlp.tools.path import (
@@ -13,5 +12,3 @@
1312
get_pythainlp_data_path,
1413
get_pythainlp_path,
1514
)
16-
17-
from pythainlp.tools.misspell import misspell

pythainlp/tools/misspell.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import numpy as np
1+
# -*- coding: utf-8 -*-
22
from typing import List
3+
import numpy as np
34

45
THAI_CHARACTERS_WITHOUT_SHIFT = [
56
"ผปแอิืทมใฝ",
@@ -113,7 +114,7 @@ def misspell(sentence: str, ratio: float = 0.05):
113114
:Example:
114115
::
115116
116-
from pythainlp.tools import misspell
117+
from pythainlp.tools.misspell import misspell
117118
118119
sentence = "ภาษาไทยปรากฏครั้งแรกในพุทธศักราช 1826"
119120

0 commit comments

Comments
 (0)