Skip to content

Commit

Permalink
Update vector pkg download link
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Liang Wang committed Jan 3, 2021
1 parent 425ba55 commit e829bf8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 3.16

- Use internal pkg download link
- keep it private, 闭源
- Use github vector pkg download link

# 3.15

Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion VALUATION.md
Original file line number Diff line number Diff line change
@@ -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 |
Expand Down
3 changes: 2 additions & 1 deletion scripts/publish.sh → scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
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/"
16 changes: 16 additions & 0 deletions scripts/pypi.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion synonyms/synonyms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e829bf8

Please sign in to comment.