Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 425ba55

Browse files
author
Hai Liang Wang
committed
Make it installable from internal site
1 parent 528c126 commit 425ba55

5 files changed

Lines changed: 16 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 3.16
2+
3+
- Use internal pkg download link
4+
- keep it private, 闭源
5+
16
# 3.15
27

38
- Fix jieba exports 冲突,改为只暴露 keywords, seg 接口

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Caution: this project is Out of Service!!!
22

3-
43
We are sorry, but you can read the codes and implement by yourself or use other packages.
54

65
在维护这个项目上,我们投入了大量的时间和资金成本,现在 Chatopera 会尽可能的维护有限的开源项目以保证质量。
@@ -28,9 +27,11 @@ Chinese Synonyms for Natural Language Processing and Understanding.
2827
# Welcome
2928

3029
```
31-
pip install -U synonyms
30+
pip install -U http://192.168.2.217:30080/ml/synonyms/synonyms-3.16.0.tar.gz
3231
```
3332

33+
Find latest versions in [http://192.168.2.217:30080/ml/synonyms](http://192.168.2.217:30080/ml/synonyms).
34+
3435
兼容 py2 和 py3,当前稳定版本 [v3.x](https://github.com/chatopera/Synonyms/releases)
3536

3637
**提示:安装后初次使用会下载词向量文件,下载速度取决于网络情况。**
@@ -317,7 +318,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
317318
[co-banner-image]: https://user-images.githubusercontent.com/3538629/42383104-da925942-8168-11e8-8195-868d5fcec170.png
318319
[co-url]: https://www.chatopera.com
319320

320-
321321
## Chatopera 云服务
322322

323323
[https://bot.chatopera.com/](https://bot.chatopera.com/)
@@ -378,7 +378,6 @@ Chatopera 机器人平台包括知识库、多轮对话、意图识别和语音
378378
</p>
379379
</details>
380380

381-
382381
<p align="center">
383382
<b>立即使用</b><br>
384383
<a href="https://bot.chatopera.com" target="_blank">

scripts/publish.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ if [ -f synonyms/data/words.vector.gz ]; then
2222
mv synonyms/data/words.vector.gz tmp
2323
fi
2424

25-
python setup.py sdist upload -r pypi
26-
mv tmp/words.vector.gz synonyms/data/words.vector.gz
25+
python setup.py sdist
26+
# python setup.py sdist upload -r pypi
27+
mv tmp/words.vector.gz synonyms/data/words.vector.gz
28+
29+
echo "Now upload ./dist/synonyms-xxx.tar.gz to `corsair:/static/ml/synonyms` download from http://192.168.2.217:30080/ml/synonyms/"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name='synonyms',
15-
version='3.15.0',
15+
version='3.16.0',
1616
description='中文近义词:聊天机器人,智能问答工具包;Chinese Synonyms for Natural Language Processing and Understanding',
1717
long_description=LONGDOC,
1818
author='Hai Liang Wang, Hu Ying Xi',

synonyms/synonyms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
__copyright__ = "Copyright (c) (2017-2020) Chatopera Inc. All Rights Reserved"
2121
__author__ = "Hu Ying Xi<>, Hai Liang Wang<[email protected]>"
2222
__date__ = "2020-09-24"
23-
__version__ = "3.15.0"
23+
__version__ = "3.16.0"
2424

2525
import os
2626
import sys
@@ -124,7 +124,7 @@ def keywords(sentence, topK=5, withWeight=False, allowPOS=()):
124124
word embedding
125125
'''
126126
# vectors
127-
_f_url = os.environ.get("SYNONYMS_WORD2VEC_BIN_URL_ZH_CN", "https://static-public.chatopera.com/ml/synonyms/words.vector.gz")
127+
_f_url = os.environ.get("SYNONYMS_WORD2VEC_BIN_URL_ZH_CN", "http://192.168.2.217:30080/ml/synonyms/words.vector.gz")
128128
_f_model = os.path.join(curdir, 'data', 'words.vector.gz')
129129
_download_model = not os.path.exists(_f_model)
130130
if "SYNONYMS_WORD2VEC_BIN_MODEL_ZH_CN" in ENVIRON:

0 commit comments

Comments
 (0)