Detects gibberish strings.
Project description
Gibberish Detector
This is based off https://github.com/rrenaud/Gibberish-Detector, and adapted so that it is a Python3 module.
Examples
Quickstart:
$ gibberish-detector train examples/big.txt > big.model
$ gibberish-detector detect --model big.model --string "ertrjiloifdfyyoiu"
True
Training Large Corpuses:
$ gibberish-detector train $(ls examples) > generic.model
Interactive Detection:
$ gibberish-detector detect --model big.model --interactive
Entering interactive mode. Press ctrl+d to quit.
Input text: superman
False (2.375)
Input text: ertrjiloifdfyyoiu
True (4.154)
Installation
pip install gibberish-detector
Usage
$ gibberish-detector -h
usage: gibberish-detector [-h] [--version] {train,detect} ...
positional arguments:
{train,detect}
train Trains a model to be used for gibberish detection.
detect Uses a trained model to identify gibberish strings.
optional arguments:
-h, --help show this help message and exit
--version Display version information.
You can also use this as an imported module:
>>> from gibberish_detector import detector
>>> Detector = detector.create_from_model('big.model')
>>> print(Detector.is_gibberish('ertrjiloifdfyyoiu'))
True
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
Built Distribution
Close
Hashes for gibberish_detector-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 520dd48533c4bd30b2a6051c26131369d946c147288c5f7fce4e125a0e5d341d |
|
MD5 | 9dd67bbecd8d5ac11db0ae6d1f4cd540 |
|
BLAKE2b-256 | 3a702ba30513075aac4df46849a086037ce36e1e7ca1f87f84840c8bc40825e6 |