Randetect
Randetect is a Python-based text analysis tool that predicts whether a given string of text appears random or has a meaningful structure. The tool is based on a combination of heuristic measures, such as text entropy, and a pre-trained logistic regression model.
Features
- Predicts randomness of a given text string.
- Utilizes both heuristic measures and a machine learning model.
- Provides preprocessing tools to clean and prepare text for analysis.
Installation
You can easily install Randetect using pip:
pip install randetect
Usage
To use Randetect, you need to instantiate the TextAnalyzer class and then call the random_detect() method to evaluate a text string. Here's how you can do it:
from randetect import random_detect
analyzer = random_detect.TextAnalyzer()
result, label = analyzer.random_detect('asdfasdf')
print(f"'{result}' is {label}.")
In addition to predicting randomness, Randetect provides a preprocess_text() method to clean and prepare text:
from randetect import random_detect
analyzer = random_detect.TextAnalyzer()
processed_text = analyzer.preprocess_text('text')
print(processed_text)
Contribution
Contributions are welcome! If you find a bug, have a feature request, or want to contribute to the code, please feel free to submit an issue or a pull request on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE.md file for more details.
Metadata
Release files for randetect 0.0.1
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 | |
|---|---|---|---|---|
| randetect-0.0.1.tar.gz | 50.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| randetect-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.1 kB
Release files / randetect-0.0.1.tar.gz
| Download URL | randetect-0.0.1.tar.gz |
|---|---|
| Size | 50.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
251f70d60e74aca010ef10829a74132a83905518774e7671b1023a214cf68d64
|
|
BLAKE2b-256 checksum How to use checksums |
eb9ab92a1b33cbebeee6268be41e16e33fe0b2b16a643bde9c7836c468d2e313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / randetect-0.0.1-py3-none-any.whl
| Download URL | randetect-0.0.1-py3-none-any.whl |
|---|---|
| Size | 49.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e32c1b3c440981216c933d4c26b52aa80e8a32c99b2bf1c285ccf043cf5c88a9
|
|
BLAKE2b-256 checksum How to use checksums |
54d1954edf5785ce6fef114e8060a94132ba62ca99409d64ccbee337bca57aea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for randetect 0.0.1
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.