Metadata-Version: 2.4
Name: temporal-text
Version: 0.1.0
Summary: Estimate how time-bound text is: 0.0 (ephemeral) to 1.0 (timeless facts)
Project-URL: Homepage, https://github.com/joe/temporal-text
Project-URL: Repository, https://github.com/joe/temporal-text
Author: Joe
License-Expression: MIT
Keywords: linguistics,machine-learning,nlp,temporality,text-analysis
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Requires-Dist: numpy>=1.20
Requires-Dist: scikit-learn>=1.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# temporal-text

Estimate how time-bound text is, from ephemeral thoughts to timeless facts.

## What is Temporality?

Temporality measures how "time-bound" a piece of text is:

- **Low temporality (0.0)**: Fleeting, immediate, ephemeral
  - "I want to go to the sauna" → ~0.15
  - "Just saw the funniest thing" → ~0.10
  - "brb getting snacks" → ~0.05

- **High temporality (1.0)**: Timeless facts, universal truths
  - "Earth has one moon" → ~0.85
  - "A triangle has three sides" → ~0.85
  - "Water boils at 100 degrees Celsius" → ~0.85

## Installation

```bash
pip install temporal-text
```

## Usage

```python
from temporal_text import temporality_score

# Low temporality - fleeting desire
score = temporality_score("I want to go to the sauna")
print(score)  # ~0.15

# High temporality - scientific fact
score = temporality_score("Earth has one moon")
print(score)  # ~0.85

# Medium temporality - current situation
score = temporality_score("I'm currently learning Spanish")
print(score)  # ~0.35
```

## How It Works

The library uses a lightweight TF-IDF + Ridge Regression model trained on ~1700 labeled examples. The model learns patterns like:

**High temporality indicators**: "is a", "always", "contains", "equals", "measures"

**Low temporality indicators**: "I", "my", "feel", "just", "tomorrow", "now"

The pre-trained model (~110KB) is bundled with the package - no downloads or API calls required.

## License

MIT
