Metadata-Version: 2.4
Name: trec-eval
Version: 10.0.0
Summary: Windows x64 Python API and CLI for the NIST trec_eval reference evaluator
Author: trec_eval contributors
License-Expression: LicenseRef-NIST
Keywords: information retrieval,TREC,evaluation,IR
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: src/trec_eval/licenses/MMAN-WIN32-LICENSE.md
License-File: src/trec_eval/licenses/NIST-LICENSE.md
License-File: src/trec_eval/licenses/STRINGS-H-LICENSE
License-File: src/trec_eval/licenses/YA-GETOPT-LICENSE.txt
Dynamic: license-file

# trec-eval für Windows

Windows-x64-Paketierung des aktuellen `usnistgov/trec_eval`-Stands (`35cf096`) mit einer einfachen Python-API. Die Berechnungen und kanonischen Metriknamen kommen aus der Upstream-Binary; dadurch bleiben `all_trec`, `all_prefs`, `qrels_jg`, Z-Scores und die vollständige CLI kompatibel.

## Installation

```powershell
py -m pip install trec-eval
```

Das Paket enthält `trec_eval.exe` und benötigt unter Windows x64 keine separate C-, .NET- oder Unix-Installation.

## Python-API

```python
from trec_eval import evaluate

result = evaluate(
    "qrels.txt",
    "run.txt",
    measures=["map", "P.10"],
    query=True,
)

print(result.summary["map"])
print(result.get("P_10"))  # kanonischer TREC-Name
```

Zusätzlich stehen `read_qrels`, `read_run` und `run_cli` zur Verfügung. Für nicht abgebildete Upstream-Optionen kann `extra_args` verwendet werden.

## CLI

```powershell
trec-eval -m all_trec qrels.txt run.txt
python -m trec_eval -q -m map qrels.txt run.txt
```

Die Eingabeformate `qrels`, `qrels_jg`, `prefs`, `qrels_prefs` und `trec_results` sowie die Upstream-Optionen werden unterstützt.

## Aus dem Quellcode bauen

Voraussetzungen: Windows x64, PowerShell und ein C-Compiler (getestet mit LLVM-MinGW/`clang`). Die Upstream-Submodule müssen vorhanden sein.

```powershell
git clone --recursive <repository-url>
.\scripts\build_windows.bat
py -m pip install build
py -m build
```

Das Wheel liegt anschließend unter `dist/`. Vor dem Paketbau müssen `build/bin/trec_eval.exe` und `src/trec_eval/bin/trec_eval.exe` vorhanden sein. Tests:

```powershell
py -m unittest discover -s tests -v
```

## Lizenz

Der Upstream-Code steht unter dem in `LICENSE` enthaltenen NIST-Hinweis. Die Lizenzen der Windows-Hilfsbibliotheken liegen unter `src/trec_eval/licenses/` und werden in das Paket übernommen.
