glove-py is an implementation of the GloVe algorithm for learning word vectors from a corpus.
Installation
using pip:
pip install glove-py
install with github code :
git clone git@github.com:f20500909/glove_py.git
python3 setup.py install
using in shell
Run
with python:
from glove import *
model = Glove(params)
model.train(input_file)
model.to_txt()
words = model.most_similary("one", 10)
print(words)
List of available params and their default value:
help info......
-input_file input_file [small_text]
-vocab_size vocabulary size to train [0]
-max_size maximum size to keep in courpus [10000000]
-min_count minimum times [1]
-window the window size to get common occurrence [10]
-embed_size embedded size [80]
-epoch train epoch [1]
-threads train thread [40]
-memory_limit memory used to tain (GB) [1]
-lr learning rate [0.05]
with shell: ./scripts/demo.sh
我去掉了很过我看上去用处不大的功能(只是我认为的用处打大的功能,有些细节并不理解也移除了),如提取共现矩阵的symmetric功能
忽略了大小写,统一改大写为小写
TODO:
修复有时会发生的错误: read err...: Connection reset by peer
在合并共现词时,高频和低频矩阵好像写在了一个文件里面,感觉有点问题.....
在编译pybind_11时不能让对应文件被include 必须用cmake加载
Reference
Metadata
Release files for glove-py 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glove_py-0.2.3.tar.gz | 19.6 kB | Without provenance | Details for glove_py-0.2.3.tar.gz |
Release files / glove_py-0.2.3.tar.gz
| Download URL | glove_py-0.2.3.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35c55cc595eb76a93b21b084f8fb18e41ee8a37e93477bb54cf8bb1ce67bccba
|
|
BLAKE2b-256 checksum How to use checksums |
64adcba9ecfa242d189607993cc0bda4d9268b448b74ed760b1e202b9aba751f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2
|
Security for glove-py 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.