Skip to content

Commit

Permalink
Change pythainlp.tools.misspell to pythainlp.tools.misspell.misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
wannaphong committed Oct 2, 2022
1 parent 354c7b9 commit 947c7be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/api/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Modules
.. autofunction:: get_full_data_path
.. autofunction:: get_pythainlp_data_path
.. autofunction:: get_pythainlp_path
.. autofunction:: misspell
.. autofunction:: pythainlp.tools.misspell.misspell
3 changes: 0 additions & 3 deletions pythainlp/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"get_full_data_path",
"get_pythainlp_data_path",
"get_pythainlp_path",
"misspell",
]

from pythainlp.tools.path import (
Expand All @@ -13,5 +12,3 @@
get_pythainlp_data_path,
get_pythainlp_path,
)

from pythainlp.tools.misspell import misspell
5 changes: 3 additions & 2 deletions pythainlp/tools/misspell.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import numpy as np
# -*- coding: utf-8 -*-
from typing import List
import numpy as np

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

0 comments on commit 947c7be

Please sign in to comment.