Metadata-Version: 2.1
Name: randetect
Version: 0.0.1
Summary: A text analysis tool that predicts whether a given string appears random or meaningful.
Home-page: https://github.com/seymasa/randetect
Author: Seyma SARIGİL
Author-email: seymasa@icloud.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: click==8.1.7
Requires-Dist: emoji==2.8.0
Requires-Dist: joblib==1.3.2
Requires-Dist: mintlemon-turkish-nlp==0.2.5
Requires-Dist: nltk==3.8.1
Requires-Dist: numpy==1.25.2
Requires-Dist: pandas==2.0.0
Requires-Dist: python-dateutil==2.8.2
Requires-Dist: pytz==2023.3.post1
Requires-Dist: regex==2023.8.8
Requires-Dist: scikit-learn==1.3.0
Requires-Dist: scipy==1.11.2
Requires-Dist: six==1.16.0
Requires-Dist: threadpoolctl==3.2.0
Requires-Dist: tqdm==4.66.1
Requires-Dist: tzdata==2023.3
Requires-Dist: zeyrek==0.1.3

# 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`:

```bash
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:

```python
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:

```python
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](https://github.com/seymasa/randetect).

## License

This project is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) file for more details.
