Skip to content

Commit

Permalink
Release Ancient Chinese models for tokenization, lemmatization, part-…
Browse files Browse the repository at this point in the history
…of-speech tagging and dependency parsing
  • Loading branch information
hankcs committed Jan 13, 2025
1 parent 0636dc6 commit 2eb94f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hanlp/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Author: hankcs
# Date: 2019-12-28 19:26

__version__ = '2.1.0'
__version__ = '2.1.1'
"""HanLP version"""


Expand Down
13 changes: 8 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
FASTTEXT = 'fasttext-wheel==0.9.2'
sys_version_info = sys.version_info

TOKENIZERS = []
if (sys_version_info.major, sys_version_info.minor) == (3, 6) and sys.platform in {'darwin', 'win32'}:
TOKENIZERS = ['tokenizers==0.10.3']
EXTRAS = []
if sys.platform in {'darwin', 'win32'}:
if (sys_version_info.major, sys_version_info.minor) == (3, 6):
EXTRAS = ['tokenizers==0.10.3']
elif (sys_version_info.major, sys_version_info.minor) == (3, 7):
EXTRAS = ['safetensors<0.5'] # Failed to build safetensors

extras_require = {
'amr': [
Expand Down Expand Up @@ -64,10 +67,10 @@
'transformers>=4.1.1',
'sentencepiece>=0.1.91', # Essential for tokenization_bert_japanese
'torch>=1.6.0',
'hanlp-common>=0.0.22',
'hanlp-common>=0.0.23',
'hanlp-trie>=0.0.4',
'hanlp-downloader',
*TOKENIZERS,
*EXTRAS,
],
extras_require=extras_require,
python_requires='>=3.6',
Expand Down

0 comments on commit 2eb94f2

Please sign in to comment.