ALIAS for nessvec
Install from Source (recommended)
Clone the repository with all the source code and data:
$ git clone git@gitlab.com:tangibleai/nessvec
$ cd nessvec
Create a conda environment and install the dependencies:
$ conda create -n nessvec 'python==3.9.7'
$ conda env update -n nessvec -f scripts/environment.yml
$ pip install -e .
Install from PyPi (only tested on Linux)
$ pip install nessvec
Get Started
>>> from nessvec.util import load_glove
>>> w2v = load_glove()
>>> seattle = w2v['seattle']
>>> seattle
array([-2.7303e-01, 8.5872e-01, 1.3546e-01, 8.3849e-01, ...
>>> portland = w2v['portland']
>>> portland
array([-0.78611 , 1.2758 , -0.0036066, 0.54873 , -0.31474 ,...
>>> len(portland)
50
>>> from numpy.linalg import norm
>>> norm(portland)
4.417...
>>> portland.std()
0.615...
>>> cosine_similarity(seattle, portland)
0.84...
>>> cosine_similarity(portland, seattle)
0.84...
>>> from nessvec.util import cosine_similarity
>>> cosine_similarity(w2v['los_angeles'], w2v['mumbai'])
.5
Metadata
Release files for nessvector 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 | |
|---|---|---|---|
| nessvector-1.0.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nessvector-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 kB
Release files / nessvector-1.0.0.tar.gz
| Download URL | nessvector-1.0.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f877d7358e801bcc053206986b9120ce9892b63b8e9426eb18a80a2be84a5487
|
|
BLAKE2b-256 checksum How to use checksums |
9f4f209eb2c58bebc673a3d40b790c40bc2ab00fb71642393cbc69b769df8a4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.16 Linux/5.15.0-58-generic
|
Release files / nessvector-1.0.0-py3-none-any.whl
| Download URL | nessvector-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
897ce70646612ea9acd22ef2d0d670dc0789cf309a2c9ef3a7bb41654434987f
|
|
BLAKE2b-256 checksum How to use checksums |
6b34b7e14ce7a5914f6b07d8dca51824ada57a133aab48732b29803c4a37033d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.16 Linux/5.15.0-58-generic
|