diff --git a/CHANGELOG.md b/CHANGELOG.md index c15b299..e1d761f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,6 @@ # 3.16 -- Use internal pkg download link -- keep it private, 闭源 +- Use github vector pkg download link # 3.15 diff --git a/README.md b/README.md index 8e0947f..58f60a1 100644 --- a/README.md +++ b/README.md @@ -1,8 +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 会尽可能的维护有限的开源项目以保证质量。 +[![PyPI](https://img.shields.io/pypi/v/synonyms.svg)](https://pypi.python.org/pypi/synonyms) [![](https://img.shields.io/pypi/pyversions/synonyms.svg)](https://pypi.org/pypi/synonyms/) [![](https://img.shields.io/pypi/l/synonyms.svg)](https://pypi.org/pypi/synonyms/) [![](https://img.shields.io/pypi/status/synonyms.svg)](https://pypi.org/pypi/synonyms/) +[![](https://img.shields.io/pypi/format/synonyms.svg)](https://pypi.org/pypi/synonyms/) # Synonyms diff --git a/VALUATION.md b/VALUATION.md index d468a4a..0023b75 100644 --- a/VALUATION.md +++ b/VALUATION.md @@ -1,4 +1,4 @@ -# synonyms 分数评测 [(v3.13.0)](https://pypi.python.org/pypi/synonyms/3.13.0) +# synonyms 分数评测 [(v3.16.0)](https://pypi.python.org/pypi/synonyms/3.16.0) | 词1 | 词2 | synonyms | 人工评定 | | --- | --- | --- | --- | | 轿车 | 汽车 | 0.892 | 0.98 | diff --git a/scripts/publish.sh b/scripts/package.sh similarity index 76% rename from scripts/publish.sh rename to scripts/package.sh index 474e39f..b81adb4 100755 --- a/scripts/publish.sh +++ b/scripts/package.sh @@ -22,8 +22,9 @@ if [ -f synonyms/data/words.vector.gz ]; then mv synonyms/data/words.vector.gz tmp fi +rm -rf ./dist/* 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 +echo "For internal package downloading, 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/scripts/pypi.sh b/scripts/pypi.sh new file mode 100755 index 0000000..71059da --- /dev/null +++ b/scripts/pypi.sh @@ -0,0 +1,16 @@ +#! /bin/bash +########################################### +# publish package to pypi +########################################### + +# constants +baseDir=$(cd `dirname "$0"`;pwd) +export PYTHONUNBUFFERED=1 +export PATH=/opt/miniconda3/envs/venv-py3/bin:$PATH + +# functions + +# main +[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return +cd $baseDir/.. +python setup.py upload -r pypi diff --git a/synonyms/synonyms.py b/synonyms/synonyms.py index 5e96ad0..3f5a2e9 100755 --- a/synonyms/synonyms.py +++ b/synonyms/synonyms.py @@ -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", "http://192.168.2.217:30080/ml/synonyms/words.vector.gz") +_f_url = os.environ.get("SYNONYMS_WORD2VEC_BIN_URL_ZH_CN", "https://github.com/chatopera/Synonyms/releases/download/3.15.0/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: