Skip to content

Commit

Permalink
Add raise ImportError for deepcut
Browse files Browse the repository at this point in the history
  • Loading branch information
wannaphong committed Apr 14, 2023
1 parent 356e47d commit 7a160de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pythainlp/tokenize/deepcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@

from typing import List, Union

from deepcut import tokenize
try:
from deepcut import tokenize
except ImportError:
raise ImportError("Please install deepcut by pip install deepcut")
from pythainlp.util import Trie


Expand Down

0 comments on commit 7a160de

Please sign in to comment.