Skip to content

Commit effe3b7

Browse files
committed
Reduce import time (pythainlp.tokenize.core)
1 parent 0195965 commit effe3b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pythainlp/tokenize/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"""
55
import re
66
from typing import Iterable, List, Union
7-
import warnings
87

98
from pythainlp.tokenize import (
109
DEFAULT_SENT_TOKENIZE_ENGINE,
@@ -14,7 +13,6 @@
1413
DEFAULT_WORD_DICT_TRIE,
1514
DEFAULT_WORD_TOKENIZE_ENGINE,
1615
)
17-
from pythainlp import thai_characters
1816
from pythainlp.util.trie import Trie, dict_trie
1917

2018

@@ -63,6 +61,7 @@ def word_detokenize(segments: Union[List[List[str]], List[str]], output: str = "
6361
_list_all = []
6462
if isinstance(segments[0], str):
6563
segments = [segments]
64+
from pythainlp import thai_characters
6665
for i, s in enumerate(segments):
6766
_list_sents = []
6867
_add_index = []

0 commit comments

Comments
 (0)