Matching fast_langdetect update (#2140)

This commit is contained in:
KamioRinn
2025-03-04 14:10:58 +08:00
committed by GitHub
parent bb8a8efeca
commit 959a2ddbeb
4 changed files with 6 additions and 65 deletions

View File

@@ -19,13 +19,13 @@ if os.name == 'nt':
print(f'you have to install eunjeon. install it...')
else:
installpath = spam_spec.submodule_search_locations[0]
if not (re.match(r'^[A-Za-z0-9_/\\:.]*$', installpath)):
if not (re.match(r'^[A-Za-z0-9_/\\:.\-]*$', installpath)):
import sys
from eunjeon import Mecab as _Mecab
class Mecab(_Mecab):
def get_dicpath(installpath):
if not (re.match(r'^[A-Za-z0-9_/\\:.]*$', installpath)):
if not (re.match(r'^[A-Za-z0-9_/\\:.\-]*$', installpath)):
import shutil
python_dir = os.getcwd()
if (installpath[:len(python_dir)].upper() == python_dir.upper()):