Skip to content

Commit 27ef709

Browse files
committed
Release Ancient Chinese models for tokenization, lemmatization, part-of-speech tagging and dependency parsing
1 parent 0636dc6 commit 27ef709

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

hanlp/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Author: hankcs
33
# Date: 2019-12-28 19:26
44

5-
__version__ = '2.1.0'
5+
__version__ = '2.1.1'
66
"""HanLP version"""
77

88

setup.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
FASTTEXT = 'fasttext-wheel==0.9.2'
1616
sys_version_info = sys.version_info
1717

18-
TOKENIZERS = []
19-
if (sys_version_info.major, sys_version_info.minor) == (3, 6) and sys.platform in {'darwin', 'win32'}:
20-
TOKENIZERS = ['tokenizers==0.10.3']
18+
EXTRAS = []
19+
if sys.platform in {'darwin', 'win32'}:
20+
if (sys_version_info.major, sys_version_info.minor) == (3, 6):
21+
EXTRAS = ['tokenizers==0.10.3']
22+
elif (sys_version_info.major, sys_version_info.minor) == (3, 7):
23+
EXTRAS = ['safetensors<0.5.2'] # Failed to build safetensors
2124

2225
extras_require = {
2326
'amr': [
@@ -64,10 +67,10 @@
6467
'transformers>=4.1.1',
6568
'sentencepiece>=0.1.91', # Essential for tokenization_bert_japanese
6669
'torch>=1.6.0',
67-
'hanlp-common>=0.0.22',
70+
'hanlp-common>=0.0.23',
6871
'hanlp-trie>=0.0.4',
6972
'hanlp-downloader',
70-
*TOKENIZERS,
73+
*EXTRAS,
7174
],
7275
extras_require=extras_require,
7376
python_requires='>=3.6',

0 commit comments

Comments
 (0)