Skip to main content

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.

Metadata

Release files for AutoPX 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AutoPX 1.1.0
File Size Uploaded
autopx-1.1.0.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AutoPX 1.1.0
File Interpreter ABI Platform
autopx-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.2 kB

Release files / autopx-1.1.0.tar.gz

Download URL autopx-1.1.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
311f8dbf34043fc599455c2f0d9195a1748d9d1172d3dfa957911265180c641d
BLAKE2b-256 checksum
How to use checksums
0c07356310f8f6c29cced9f57966c197587a8e7d4130117c62013a60d984c668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / autopx-1.1.0-py3-none-any.whl

Download URL autopx-1.1.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ed4050f86b40df911533f31efd2442c4c27112c9639b3f08ad142db22459700
BLAKE2b-256 checksum
How to use checksums
9774c06fc9f4fbd00c29b0dc23784bf2fe9d00141665e36ce12a79f62fa4467e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page