Embeds text documents using sent2vec
Project description
Sentence Embedding
A python wrapper for embedding short texts or sentences using sent2vec, which draws on FastText.
To embed a list of strings documents
, use:
from nk_sent2vec import Sent2Vec
vectorizer = Sent2Vec(path = '/root/models/torontobooks_unigrams.bin')
print(vectorizer.embed_sentences(sentences=documents))
Testing
Tests can be run using pytest -s tests
Also see makefile
for default commands
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nk_sent2vec-1.4.2.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file nk_sent2vec-1.4.2.tar.gz
.
File metadata
- Download URL: nk_sent2vec-1.4.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1880f796aca315677f3e9cfa8c36d5a39065c18c29614a04417e28fa326f478 |
|
MD5 | 3321b2cdf4a453d7b955fec0d72e4c72 |
|
BLAKE2b-256 | 0f5bb60eeaf1f89c64d0d784171f78b5b72dff031f9be86d8ce06f658b3daef3 |
File details
Details for the file nk_sent2vec-1.4.2-py3-none-any.whl
.
File metadata
- Download URL: nk_sent2vec-1.4.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f87d76ff1592b06c0b155ae8babcac128db744942eea04e6ab6b4df3e9cf68e0 |
|
MD5 | f8f5ad94f106833172181cac0722c87b |
|
BLAKE2b-256 | f3bb36f6b4dc2177568819dfc30531954766bb494b803c8c2f05b7a7d8ae9208 |