Metadata-Version: 2.4
Name: aion-sentiment
Version: 0.3.0
Summary: AION Unified Sentiment Model for Indian Financial News - Multi-task transformer (95 events, 32 sectors, macro signal)
Home-page: https://github.com/aion-open-source/aion-sentiment
Author: AION Open Source Contributors
Author-email: AION Open Source Contributors <aionlabs@tutamail.com>
Maintainer-email: AION Open Source Contributors <aionlabs@tutamail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/aion-open-source/aion-sentiment
Project-URL: Documentation, https://github.com/aion-open-source/aion-sentiment#readme
Project-URL: Repository, https://github.com/aion-open-source/aion-sentiment
Project-URL: Issues, https://github.com/aion-open-source/aion-sentiment/issues
Project-URL: AION Project, https://github.com/aion-open-source
Keywords: sentiment-analysis,financial-nlp,emotion-detection,nlp,machine-learning,pytorch,transformers,aion,indian-markets
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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 :: Office/Business :: Financial
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: transformers>=4.30.0
Requires-Dist: torch>=2.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.1.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Requires-Dist: types-requests>=2.31.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=1.24.0; extra == "docs"
Provides-Extra: all
Requires-Dist: pytest>=7.4.0; extra == "all"
Requires-Dist: pytest-cov>=4.1.0; extra == "all"
Requires-Dist: black>=23.0.0; extra == "all"
Requires-Dist: flake8>=6.1.0; extra == "all"
Requires-Dist: mypy>=1.5.0; extra == "all"
Requires-Dist: types-requests>=2.31.0; extra == "all"
Requires-Dist: sphinx>=7.0.0; extra == "all"
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "all"
Requires-Dist: sphinx-autodoc-typehints>=1.24.0; extra == "all"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# AION Unified Sentiment Model

Multi-task transformer for Indian financial news analysis. Predicts sentiment, event classification, macro signal, and sector impacts from a single headline.

- Model: https://huggingface.co/AION-Analytics/aion-sentiment-unified-v1
- Dataset: https://huggingface.co/datasets/AION-Analytics/indian_financial_news_42k
- PyPI: https://pypi.org/project/aion-sentiment/0.2.0/

## What It Does

- Sentiment: negative / neutral / positive (temperature-calibrated with T=1.5)
- Event classification: 95 Indian market events (RBI rate change, corporate earnings, geopolitical, etc.)
- Macro signal: overall market impact score from -1 to +1
- Sector impacts: 32 NSE sector scores with bias propagation (e.g. rupee appreciation = negative for IT, positive for Aviation)

## Quick Start

```bash
pip install aion-sentiment
```

```python
from aion_sentiment import AIONUnifiedModel

model = AIONUnifiedModel.from_pretrained("AION-Analytics/aion-sentiment-unified-v1")

result = model.predict("RBI cuts repo rate by 25 bps to boost growth")
print(result['sentiment'])             # positive
print(result['sentiment_confidence'])  # 0.89
print(result['macro_signal'])          # +0.53

# Sector impacts (32 sectors)
print(result['sector_impacts']['Banks'])      # positive
print(result['sector_impacts']['Realty'])     # positive
```

## Model Details

- Base: distilbert-base-uncased, 67M parameters, 270MB
- Trained on 42,214 Indian financial headlines (2024-2026)
- Sentiment accuracy: 97.2%
- Event classification accuracy: 99.5%
- Macro signal correlation: 0.990

## Sector Bias Rules

The model learns from taxonomy context rules that define how each event affects sectors:

Inverse bias (sector moves opposite to macro signal): IT, Healthcare
Aligned bias (sector moves with macro signal): Oil, Aviation, Metals, Consumer Durables, Capital Goods, Chemicals

## License

Apache 2.0
