Metadata-Version: 2.4
Name: anyai
Version: 0.2.2
Summary: AnyAI - One-liner AI for everyone. A unified gateway to AI capabilities.
Project-URL: Homepage, https://www.nrl.ai
Project-URL: Repository, https://github.com/vietanhdev/anyai
Project-URL: Documentation, https://github.com/vietanhdev/anyai#readme
Project-URL: Issues, https://github.com/vietanhdev/anyai/issues
Author-email: Viet-Anh Nguyen <vietanh.dev@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,cv,deep-learning,machine-learning,ml,nlp,ocr
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: click>=8.0
Requires-Dist: pillow>=9.0.0
Requires-Dist: rich>=12.0
Provides-Extra: all
Requires-Dist: anycv; extra == 'all'
Requires-Dist: anydeploy; extra == 'all'
Requires-Dist: anyllm; extra == 'all'
Requires-Dist: anyml; extra == 'all'
Requires-Dist: anynlp; extra == 'all'
Requires-Dist: anyocr; extra == 'all'
Requires-Dist: anyrobo; extra == 'all'
Requires-Dist: tableai; extra == 'all'
Requires-Dist: traincv; extra == 'all'
Provides-Extra: cv
Requires-Dist: anycv; extra == 'cv'
Provides-Extra: deploy
Requires-Dist: anydeploy; extra == 'deploy'
Provides-Extra: llm
Requires-Dist: anyllm; extra == 'llm'
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
Provides-Extra: ml
Requires-Dist: anyml; extra == 'ml'
Provides-Extra: nlp
Requires-Dist: anynlp; extra == 'nlp'
Provides-Extra: ocr
Requires-Dist: anyocr; extra == 'ocr'
Provides-Extra: robo
Requires-Dist: anyrobo; extra == 'robo'
Provides-Extra: table
Requires-Dist: tableai; extra == 'table'
Provides-Extra: traincv
Requires-Dist: traincv; extra == 'traincv'
Provides-Extra: voice
Requires-Dist: anyrobo; extra == 'voice'
Description-Content-Type: text/markdown

<h1 align="center">AnyAI</h1>
<p align="center"><em>One-liner AI for everyone</em></p>

![PyPI](https://img.shields.io/pypi/v/anyai)
![Python](https://img.shields.io/pypi/pyversions/anyai)
![License](https://img.shields.io/pypi/l/anyai)

**AnyAI** is a unified gateway to AI capabilities. It works standalone with built-in rule-based functionality and supports optional extras for advanced AI through sub-packages.

## Installation

**Basic install** (includes built-in text and image utilities):

```bash
pip install anyai
```

**With optional extras:**

```bash
# Install with computer vision support
pip install anyai[cv]

# Install with LLM support
pip install anyai[llm]

# Install with OCR support
pip install anyai[ocr]

# Install everything
pip install anyai[all]
```

## Quick Start

```python
import anyai

# See what's available
anyai.about()

# Check installed backends
anyai.available_backends()
```

### Text Processing

```python
from anyai import text

# Rule-based extractive summarization — scores sentences by position,
# keyword frequency, and length, then selects the top-scoring sentences
summary = text.summarize("Your long text goes here...")

# TF-IDF-like keyword extraction — ranks words by frequency relative
# to their expected frequency in general text
keywords = text.extract_keywords("Machine learning is a subset of artificial intelligence.")

# Lexicon-based sentiment analysis with negation handling and intensifiers
# Uses an AFINN-style word scoring dictionary
result = text.sentiment("This product is absolutely wonderful!")
print(result)  # {'label': 'positive', 'score': 0.85}
```

### Image Processing

```python
from anyai import image

# Describe an image (returns metadata; with optional deps, returns AI description)
info = image.describe("photo.jpg")
print(info)
# {'path': 'photo.jpg', 'format': 'JPEG', 'width': 1920, 'height': 1080, ...}
```

### Utilities

```python
from anyai import utils

# Check if optional dependencies are available
utils.check_deps("cv")
utils.check_deps("llm")
```

## Sub-Packages

| Package | Extra | Description |
|---------|-------|-------------|
| [anycv](https://github.com/vietanhdev/anycv) | `anyai[cv]` | Computer vision: detection, segmentation, tracking |
| [anyocr](https://github.com/vietanhdev/anyocr) | `anyai[ocr]` | Optical character recognition |
| [anyllm](https://github.com/vietanhdev/anyllm) | `anyai[llm]` | Large language model integration |
| [anyml](https://github.com/vietanhdev/anyml) | `anyai[ml]` | Classical machine learning utilities |
| [anynlp](https://github.com/vietanhdev/anynlp) | `anyai[nlp]` | Natural language processing |
| [anydeploy](https://github.com/vietanhdev/anydeploy) | `anyai[deploy]` | Model deployment and serving |
| [tableai](https://github.com/vietanhdev/tableai) | `anyai[table]` | Table understanding and extraction |

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

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

## Links

- Website: [nrl.ai](https://www.nrl.ai)
- GitHub: [github.com/vietanhdev/anyai](https://github.com/vietanhdev/anyai)
- PyPI: [pypi.org/project/anyai](https://pypi.org/project/anyai/)
- Author: [Viet-Anh Nguyen](https://github.com/vietanhdev)
