Skip to main content

AutoPX – Automatic NLP Preprocessing with Explainable Reports

Project description

AutoPX — Automatic Preprocessing with eXplainability

AutoPX is an intelligent Python library designed to automatically preprocess raw text data and transform it into model-ready representations while providing complete explainability for every preprocessing decision.

The library eliminates the need for manually writing repetitive preprocessing logic by analyzing the input data, adapting preprocessing rules dynamically, and selecting the most suitable transformation strategy. Unlike traditional preprocessing tools that act as black boxes, AutoPX generates human-readable reports that explain what actions were applied, why they were chosen, and how they impact the final output.


🚀 Features

  • Automatic Language Detection: Support for English, Urdu, Roman Urdu, and more, with language-specific preprocessing rules.
  • Task Inference: Automatically detects the intended NLP task (Sentiment Analysis, Topic Modeling, Chatbot/Dialog) based on text characteristics.
  • Adaptive Text Cleaning: Intelligent lowercasing, symbol handling, emoji/URL preservation, and context-aware normalization.
  • Stopword & Token Management: Decides stopword retention/removal and optimal tokenization automatically.
  • Vectorization & Output Preparation: Chooses between TF-IDF, CountVectorizer, Word2Vec, FastText, or transformer embeddings; handles padding/truncation for ML/DL models.
  • Fail-Safe & Reliability: Detects preprocessing failures and applies fallback strategies transparently.
  • Explainable Report Generation: Generates step-by-step reasoning reports in JSON, Markdown, or PDF formats.
  • Real-Time Adaptive Learning: Designed to improve task inference and preprocessing accuracy over repeated runs.
  • Framework Compatibility: Seamlessly integrates with scikit-learn, TensorFlow, PyTorch, and HuggingFace Transformers.

🛠 Installation

You can install AutoPX directly from source (or via pip in the future):

pip install AutoPX==1.0.1

Or for development:

git clone https://github.com/MudassarGill/AutoPX.git
cd AutoPX
pip install -e .

📖 Usage Example

Preprocessing your text is as simple as one line:

from autopx import AutoPX

# Initialize AutoPX (automatically infers task and language)
auto = AutoPX()

# Multi-lingual raw data
texts = [
    "I absolutely love this product! 😄 Visit http://example.com for more info.",
    "یہ ایک بہترین کتاب ہے!",
    "Main bohat khush hoon today! 😄"
]

# Process data
vectors = auto.fit_transform(texts)

# Generate an explainable report
report_path = auto.report(format="markdown")
print(f"Report generated at: {report_path}")

📁 Folder Structure

AutoPX/
│
├── autopx/                         # Main package
│   ├── core/                       # Core decision-making logic (DataAnalysis, DecisionEngine)
│   ├── preprocessing/              # Text preprocessing (Cleaner, Tokenizer, Stopwords)
│   ├── vectorizers/                # Vectorization strategies (TF-IDF, Count, Embeddings)
│   ├── reports/                    # Explainable reporting system (JSON, Markdown, PDF)
│   ├── fallback/                   # Fail-safe logic
│   ├── utils/                      # Helper utilities, constants, and logging
│   └── config/                     # Configuration management
│
├── examples/                       # Usage examples
├── tests/                          # Unit & integration tests
├── setup.py                        # Package installation script
└── README.md                       # Main documentation

🤝 Contact Information

For any queries, feedback, or collaboration, feel free to reach out:


📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autopx-1.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autopx-1.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file autopx-1.1.0.tar.gz.

File metadata

  • Download URL: autopx-1.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for autopx-1.1.0.tar.gz
Algorithm Hash digest
SHA256 311f8dbf34043fc599455c2f0d9195a1748d9d1172d3dfa957911265180c641d
MD5 60a4acb23f1d9de85b45fdaf4c96f5db
BLAKE2b-256 0c07356310f8f6c29cced9f57966c197587a8e7d4130117c62013a60d984c668

See more details on using hashes here.

File details

Details for the file autopx-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: autopx-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for autopx-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ed4050f86b40df911533f31efd2442c4c27112c9639b3f08ad142db22459700
MD5 f60a8c4f5a25258d93cb12278fee50fe
BLAKE2b-256 9774c06fc9f4fbd00c29b0dc23784bf2fe9d00141665e36ce12a79f62fa4467e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page