# gdonaj/spoken-2-standard-evaluation architecture

> Architecture diagram of the GitHub repository gdonaj/spoken-2-standard-evaluation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gdonaj/spoken-2-standard-evaluation
- Repository: https://github.com/gdonaj/spoken-2-standard-evaluation

## Overview

This is a small command-line evaluator for spoken-to-standard language normalization. Users provide source text, standard references, and one or more system outputs; the script compares them and reports categorized errors and unchanged-word rates. Optional capabilities include approximate-randomization and bootstrap tests, plus LaTeX tables and HTML error visualizations. The implementation is a single script; the excerpts do not show all of its file-loading and dispatch logic, so the graph keeps internal responsibilities consolidated.

Main entry points: [`spk2std-evaluation.py`](https://github.com/gdonaj/spoken-2-standard-evaluation/blob/main/spk2std-evaluation.py) (Evaluation CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Evaluator user"))
node_source["Source segments"]
node_reference["Standard references"]
node_outputs["System outputs"]
node_evaluator["Evaluation CLI"]
node_levenshtein["Levenshtein"]
node_statistics["Statistical tests"]
node_latex["LaTeX report"]
node_html["HTML error report"]
node_console["Console results"]

node_user -->|"runs"| node_evaluator
node_source -->|"provides segments"| node_evaluator
node_reference -->|"provides targets"| node_evaluator
node_outputs -->|"provides hypotheses"| node_evaluator
node_evaluator -->|"aligns text"| node_levenshtein
node_evaluator -->|"tests systems"| node_statistics
node_evaluator -.->|"writes optionally"| node_latex
node_evaluator -.->|"writes optionally"| node_html
node_evaluator -->|"prints results"| node_console

click node_evaluator "https://github.com/gdonaj/spoken-2-standard-evaluation/blob/main/spk2std-evaluation.py"
click node_statistics "https://github.com/gdonaj/spoken-2-standard-evaluation/blob/main/spk2std-evaluation.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user toneBlue
class node_source,node_reference,node_outputs,node_levenshtein,node_latex,node_html,node_console toneIndigo
class node_evaluator,node_statistics toneTeal
```

## Components

### Other components

- **Evaluator user**
- **Source segments**
- **Standard references**
- **System outputs**
- [Evaluation CLI](https://github.com/gdonaj/spoken-2-standard-evaluation/blob/main/spk2std-evaluation.py): `spk2std-evaluation.py`
- **Levenshtein**
- [Statistical tests](https://github.com/gdonaj/spoken-2-standard-evaluation/blob/main/spk2std-evaluation.py): `spk2std-evaluation.py`
- **LaTeX report**
- **HTML error report**
- **Console results**

## Connections

- Evaluator user → Evaluation CLI: runs
- Source segments → Evaluation CLI: provides segments
- Standard references → Evaluation CLI: provides targets
- System outputs → Evaluation CLI: provides hypotheses
- Evaluation CLI → Levenshtein: aligns text
- Evaluation CLI → Statistical tests: tests systems
- Evaluation CLI → LaTeX report: writes optionally
- Evaluation CLI → HTML error report: writes optionally
- Evaluation CLI → Console results: prints results
