Skip to content

Commit

Permalink
fix data dir. #389
Browse files Browse the repository at this point in the history
  • Loading branch information
shibing624 committed Mar 20, 2024
1 parent d0cd177 commit 8e27df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycorrector/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

pwd_path = os.path.abspath(os.path.dirname(__file__))
# -----用户目录,存储模型文件-----
USER_DATA_DIR = os.path.expanduser('~/.pycorrector/datasets/')
USER_DATA_DIR = os.environ.get('PYCORRECTOR_DATA_DIR', os.path.expanduser('~/.pycorrector/datasets'))
os.makedirs(USER_DATA_DIR, exist_ok=True)
language_model_path = os.path.join(USER_DATA_DIR, 'zh_giga.no_cna_cmn.prune01244.klm')

Expand Down

0 comments on commit 8e27df5

Please sign in to comment.