[![travis][travis-image]][travis-url]
[![pypi][pypi-image]][pypi-url]
[travis-image]: https://img.shields.io/travis/Yoctol/word-embedder.svg?style=flat
[travis-url]: https://travis-ci.org/Yoctol/word-embedder
[pypi-image]: https://img.shields.io/pypi/v/word-embedder.svg?style=flat
[pypi-url]: https://pypi.python.org/pypi/word-embedder
Get pretrained word embedding
## Installation
### Requirements
* Linux
* Python 3.6 and up
`$ pip install word-embedder`
## Usage
### Lookup all existed embedders
```python
from word_embedder import lib
lib.list_all_embedders() # returns a list of embedder name
```
### Use an existed embedder
1. load an embedder called OHOH
```python
from word_embedder import lib
name = 'OHOH' # embedder name
embedder = lib[name]
```
2. extract a word vector
- (1) given a word 'juice' (str)
```python
word = 'juice'
embedder[word] # returns the corresponding word vector
# Note: if 'juice' is not in the vocabulary,
# OOVError would be raised.
```
- (2) given an index 3 (int)
```python
index = 3
embedder[index] # returns the corresponding word vector
# Note: if the index is out of range of vocabulary size,
# OOVError would be raised.
```
Metadata
Release files for word-embedder 1.0.0
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 |
|---|---|---|---|---|
| word-embedder-1.0.0.tar.gz | 7.9 kB | Without provenance | Details for word-embedder-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| word_embedder-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for word_embedder-1.0.0-py3-none-any.whl |
Total release size: 23.5 kB
Release files / word-embedder-1.0.0.tar.gz
| Download URL | word-embedder-1.0.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc5fa5016fdaa2813debc0265794dd6cd76f9d1e479076c3293679500b901c0c
|
|
BLAKE2b-256 checksum How to use checksums |
011e823d3c4e2b88534e0ae686e8d6e31d2c1678a1b58c5162f2158982e0674a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|
Release files / word_embedder-1.0.0-py3-none-any.whl
| Download URL | word_embedder-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67b406105959ff4aeace8d6aefbc1f0bc7cac63b0dc198ab9d0000a8ae8ed2f1
|
|
BLAKE2b-256 checksum How to use checksums |
399c46e19a9ee67d95cca9658eb6c17e010ffa29faa9dc1c00be8001b12c9f11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|
Security for word-embedder 1.0.0
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.