From 425ba5563c90a016beeb5b7ebf71b8677619b40b Mon Sep 17 00:00:00 2001 From: Hai Liang Wang Date: Tue, 1 Dec 2020 13:24:44 +0800 Subject: [PATCH] Make it installable from internal site --- CHANGELOG.md | 5 +++++ README.md | 7 +++---- scripts/publish.sh | 7 +++++-- setup.py | 2 +- synonyms/synonyms.py | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87f4fef..c15b299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 3.16 + +- Use internal pkg download link +- keep it private, 闭源 + # 3.15 - Fix jieba exports 冲突,改为只暴露 keywords, seg 接口 diff --git a/README.md b/README.md index 99c38eb..8e0947f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Caution: this project is Out of Service!!! - We are sorry, but you can read the codes and implement by yourself or use other packages. 在维护这个项目上,我们投入了大量的时间和资金成本,现在 Chatopera 会尽可能的维护有限的开源项目以保证质量。 @@ -28,9 +27,11 @@ Chinese Synonyms for Natural Language Processing and Understanding. # Welcome ``` -pip install -U synonyms +pip install -U http://192.168.2.217:30080/ml/synonyms/synonyms-3.16.0.tar.gz ``` +Find latest versions in [http://192.168.2.217:30080/ml/synonyms](http://192.168.2.217:30080/ml/synonyms). + 兼容 py2 和 py3,当前稳定版本 [v3.x](https://github.com/chatopera/Synonyms/releases)。 **提示:安装后初次使用会下载词向量文件,下载速度取决于网络情况。** @@ -317,7 +318,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI [co-banner-image]: https://user-images.githubusercontent.com/3538629/42383104-da925942-8168-11e8-8195-868d5fcec170.png [co-url]: https://www.chatopera.com - ## Chatopera 云服务 [https://bot.chatopera.com/](https://bot.chatopera.com/) @@ -378,7 +378,6 @@ Chatopera 机器人平台包括知识库、多轮对话、意图识别和语音

-

立即使用
diff --git a/scripts/publish.sh b/scripts/publish.sh index 273e548..474e39f 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -22,5 +22,8 @@ if [ -f synonyms/data/words.vector.gz ]; then mv synonyms/data/words.vector.gz tmp fi -python setup.py sdist upload -r pypi -mv tmp/words.vector.gz synonyms/data/words.vector.gz \ No newline at end of file +python setup.py sdist +# python setup.py sdist upload -r pypi +mv tmp/words.vector.gz synonyms/data/words.vector.gz + +echo "Now upload ./dist/synonyms-xxx.tar.gz to `corsair:/static/ml/synonyms` download from http://192.168.2.217:30080/ml/synonyms/" \ No newline at end of file diff --git a/setup.py b/setup.py index a6f3038..35d585e 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ https://github.com/chatopera/Synonyms setup( name='synonyms', - version='3.15.0', + version='3.16.0', description='中文近义词:聊天机器人,智能问答工具包;Chinese Synonyms for Natural Language Processing and Understanding', long_description=LONGDOC, author='Hai Liang Wang, Hu Ying Xi', diff --git a/synonyms/synonyms.py b/synonyms/synonyms.py index 30ec495..5e96ad0 100755 --- a/synonyms/synonyms.py +++ b/synonyms/synonyms.py @@ -20,7 +20,7 @@ from __future__ import division __copyright__ = "Copyright (c) (2017-2020) Chatopera Inc. All Rights Reserved" __author__ = "Hu Ying Xi<>, Hai Liang Wang" __date__ = "2020-09-24" -__version__ = "3.15.0" +__version__ = "3.16.0" import os import sys @@ -124,7 +124,7 @@ def keywords(sentence, topK=5, withWeight=False, allowPOS=()): word embedding ''' # vectors -_f_url = os.environ.get("SYNONYMS_WORD2VEC_BIN_URL_ZH_CN", "https://static-public.chatopera.com/ml/synonyms/words.vector.gz") +_f_url = os.environ.get("SYNONYMS_WORD2VEC_BIN_URL_ZH_CN", "http://192.168.2.217:30080/ml/synonyms/words.vector.gz") _f_model = os.path.join(curdir, 'data', 'words.vector.gz') _download_model = not os.path.exists(_f_model) if "SYNONYMS_WORD2VEC_BIN_MODEL_ZH_CN" in ENVIRON: