Installation¶
Get TempoEval up and running in minutes.
Quick Install¶
The easiest way to install TempoEval is via pip:
What's Included
The base installation includes:
- ✅ Regex Extraction - Fast year extraction (default method)
- ✅ All 20+ Metrics - Retrieval, generation, and reasoning evaluation
- ✅ Focus Time Core - QFT/DFT/AFT extraction and comparison
- ✅ BM25 Retriever - Basic retrieval functionality
Advanced Setup¶
Temporal Taggers¶
For more accurate temporal expression extraction beyond regex, TempoEval supports multiple external temporal taggers:
The recommended choice for most users - pure Python, fast, and multi-language support.
Pure Python, focused on English natural language expressions.
Ultra-fast for high-throughput scenarios (sub-millisecond).
Most accurate for complex expressions, but very slow (requires Java JVM startup).
Requirements
HeidelTime requires Java Runtime Environment (JRE) 8 or higher.
1. Verify Java Installation:
If Java is not installed:
- Ubuntu/Debian:
sudo apt-get install default-jre - macOS:
brew install openjdk@11 - Windows: Download from Oracle Java
2. Install Python Wrapper:
3. Usage:
LLM Providers¶
Install LLM provider packages to use LLM-based metrics:
Dense Retrievers¶
For semantic search with dense embeddings:
Supported Models:
- BGE (Beijing Academy of Artificial Intelligence)
- Contriever (Facebook AI)
- Custom sentence-transformer models
from tempoeval.retrieval import DenseRetriever
retriever = DenseRetriever(model_name="BAAI/bge-base-en-v1.5")
Development Installation¶
For contributors or those who want to modify the source code:
1. Clone the Repository¶
2. Create Virtual Environment¶
3. Install in Editable Mode¶
# Install package in editable mode
pip install -e .
# Install development dependencies
pip install -e ".[dev]"
4. Run Tests¶
Verify Installation¶
Test that everything is working:
from tempoeval.core import extract_qft, extract_dft
from tempoeval.metrics import TemporalPrecision
# Extract focus times
qft = extract_qft("What happened in 2020?")
dft = extract_dft("The COVID-19 pandemic began in 2020.")
print(f"Query Focus Time: {qft.years}") # {2020}
print(f"Document Focus Time: {dft.years}") # {2020}
# Test metric
metric = TemporalPrecision(use_focus_time=True)
score = metric.compute(qft=qft, dfts=[dft], k=1)
print(f"Temporal Precision: {score}") # 1.0
Installation Complete
You're all set! Head to the Quick Start guide to run your first evaluation.
Troubleshooting¶
ImportError: No module named 'tempoeval'
Make sure you've installed the package and activated your virtual environment:
HeidelTime not working
Ensure Java is installed and accessible:
GPU not detected for dense retrievers
Check PyTorch CUDA installation:
What's Next?¶
- Quick Start Guide - Your first evaluation in 5 minutes
- Core Concepts - Understand Focus Time and evaluation modes
- Tutorials - Step-by-step guides for common tasks