nlpsig
NLPSig (nlpsig) is a Python package for constructing streams/paths of
embeddings obtained from transformers. The key contributions are:
- A simple API for taking streams of textual data and constructing streams of
embeddings from transformers
- The
nlpsig.SentenceEncoderandnlpsig.TextEncoderclasses allow you to pass in a corpus of text data (in a variety of formats) and obtain corresponding embeddings using thesentence-transformerand HuggingFacetransformerslibraries, respectively. - The
nlpsig.PrepareDataallows you to easily construct paths/streams of embeddings which can be used for several downstream tasks.
- The
- Simple API for performing dimensionality reduction with
nlpsig.DimReduceon the embeddings obtained from transformers by some simple wrappers over popular dimensionality reduction algorithms such as PCA, UMAP, t-SNE, etc.- This is particularly useful if we wish to use path signatures in any downstream model since the dimensionality of the embeddings obtained from transformers is usually very high.
- We present some Signature Network models for longitudinal NLP tasks in the
sig-networkslibrary which uses these paths constructed in this library as inputs to neural networks which utilise path signature methodology.
- We also have
simple classes
for constructing train/test splits of the data and for K-fold cross-validation
in which are general and are applied to examples in the Signature Networks in
the
sig-networkslibrary.
Installation
NLPSig is available on PyPI and can be installed with pip:
pip install nlpsig
Contributing
To take advantage of pre-commit, which will automatically format your code and
run some basic checks before you commit:
pip install pre-commit # or brew install pre-commit on macOS
pre-commit install # will install a pre-commit hook into the git repo
After doing this, each time you commit, some linters will be applied to format
the codebase. You can also/alternatively run pre-commit run --all-files to run
the checks.
See CONTRIBUTING.md for more information on running the test
suite using nox.
Metadata
Release files for nlpsig 0.2.2
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 | |
|---|---|---|---|---|
| nlpsig-0.2.2.tar.gz | 48.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nlpsig-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 83.2 kB
Release files / nlpsig-0.2.2.tar.gz
| Download URL | nlpsig-0.2.2.tar.gz |
|---|---|
| Size | 48.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52a7a617e2668ca4d846c0facdbc3c96a437b6ce593a6ca78a243ed761017357
|
|
BLAKE2b-256 checksum How to use checksums |
bef3cf7844db4470e00fe8f1d34db63235cafe1e396b1108310c94ff719cef59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / nlpsig-0.2.2-py3-none-any.whl
| Download URL | nlpsig-0.2.2-py3-none-any.whl |
|---|---|
| Size | 34.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a328db69729bb9ea8cb35dd9d9becc8bbb602cad12e281bb2ac8f5a0cef91fa2
|
|
BLAKE2b-256 checksum How to use checksums |
eb2e6d8ebf55560e6703fd161bcd71af0060525b016c67e32d00f927703cbade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for nlpsig 0.2.2
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.