SeaQuBe
Semantic Quality Benchmark for Word Embeddings, i.e. Natural Language Models in Python. Acronym SeaQuBe or seaqube.
This python framework provides several text augmentation implementations and word embedding quality evaluation methods. It is designed to fit in your machine learning pipeline. The BaseAugmentation class provides the same api as the python package nlpaug, so that this packages can used together smoothly. However BaseAugmentation provides also other methods. Detailed examples see beneath.
SeaQuBe provides also a toolkit to wrap a trained nlp model to a nice interactive tool.
Features
- Text Data Augmentation
- Chaining and Reducing of Text Data Augmentations
- Word Embedding Quality Methods
- Interactive NLM Model Wrapper
Demo
- Augmentation in three lines
- Example of Basic Text Augmentation
- Example of Text Augmentation Chaining
- Example of Word Embedding Evaluation
- Example of Interactive NLP
Augmentation
| Level | Augmenter | Description |
|---|---|---|
| Character | QwertyAugmentation | Simulate keyboard distance error |
| Corpus | UnigramAugmentation | Replace ubiquitous words with other ubiquitous words |
| Word | Active2PassiveAugmentation | Change surface of document using an simple active-to-passive transformer |
| Word | EDAAugmentation | Augment document using the EDA algorithm |
| Word | EmbeddingAugmentation | Replace similar word using WordNet |
| Word | TranslationAugmentation | Change surface of document using translation and back-translation (with GoogleTranslate) |
Augmentation Chainer
The streaming feature of augmentation is implemented in the AugmentationStreamer class. One Reduceing class exist, more can implemented
extending the BaseReduction class.
| Action | Class | Description |
|---|---|---|
| Streaming | AugmentationStreamer | Run augmentation for each document through all chained augmentations. |
| Reducing | UniqueCorpusReduction | Getting a list of documents, only unique documents are returned. |
Word Embedding Evaluation
| Method | Description |
|---|---|
| WordAnalogyBenchmark | This method benchmark how go relations of the type: a is to b as c is to d can be solved correctly. |
| WordSimilarityBenchmark | This methods compares the similarity of a word pair, calculated by a model with a human estimated similarity score. |
| WordOutliersBenchmark | This method benchmark how good a outlier of a group of words can be detected. |
| SemanticWordnetBenchmark | Based on the WordNet graph, the goodnes of the semantic / similarity of a nlp model is benchmarked. |
Installation
SeaQuBe can be installed from PyPip using: pip install seaqube or run in the main directory: python setup.py install.
External Dependencies
Some external dependencies are not installed automatically, but seaqube or nltk might throw errors with an instruction what to do.
For example seqube might ask you to run:
python -c "from seaqube import download;download('vec4ir')"
Quick Demo
from seaqube.augmentation.word import Active2PassiveAugmentation, EDAAugmentation, TranslationAugmentation, EmbeddingAugmentation
translate = TranslationAugmentation(max_length=2)
translate.doc_augment(['This', 'is', 'a', 'tokenized', 'corpus'])
Setup Dev Environment
TODO
Metadata
Release files for seaqube 0.1.11
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 |
|---|---|---|---|---|
| seaqube-0.1.11.tar.gz | 3.1 MB | Without provenance | Details for seaqube-0.1.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seaqube-0.1.11-py3-none-any.whl | Python 3 | none | any | Details for seaqube-0.1.11-py3-none-any.whl |
Total release size: 6.3 MB
Release files / seaqube-0.1.11.tar.gz
| Download URL | seaqube-0.1.11.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa6301d1e1fbbbde82c61d440e1970cab8a783d0d3843537649b9a2566b55b7c
|
|
BLAKE2b-256 checksum How to use checksums |
5190e862d9b191319341534da14c7aa58fe0f30e932514bf64aa19386614a237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
|
Release files / seaqube-0.1.11-py3-none-any.whl
| Download URL | seaqube-0.1.11-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa43035722b3e591a3776ffd525fe215846c7c2ecc55cb24765a466051496372
|
|
BLAKE2b-256 checksum How to use checksums |
143ce43b3af9690579b65285af58baa7baf134cac4be9b1d06670ddd09182d4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
|
Security for seaqube 0.1.11
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.