Skip to content

Feat/enhanced error analysis - #20

Merged
kavyamanohar merged 4 commits into
mainfrom
feat/enhanced-error-analysis
Apr 24, 2026
Merged

Feat/enhanced error analysis#20
kavyamanohar merged 4 commits into
mainfrom
feat/enhanced-error-analysis

Conversation

@kavyamanohar

Copy link
Copy Markdown
Member

No description provided.

kavyamanohar and others added 4 commits April 23, 2026 23:28
Add --analysis flag to batch_evaluate.py for comprehensive error reporting:
- Token breakdown table per category (Exact Match, Accuracy, Sub/Del/Ins,
  Error Rate, Impact on Total)
- Frequent substitution/deletion/insertion tables with counts
- Multi-panel category breakdown chart (stacked bar + contribution panel)

New core library modules:
- analysis.py: TER, category contributions, error type distribution,
  frequency analysis (compute_error_summary as convenience entry point)
- charts.py: matplotlib chart generation (category_breakdown_chart,
  frequent_errors_bar_chart)

Extended existing modules:
- measure.py: token_error_details() and text_error_details() to collect
  individual error records from aligned token pairs
- measure_batch.py: collect_error_details param, aggregate_error_details()
- reporting.py: format_contribution_table(), format_frequent_errors_table()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire analysis.py, charts.py, and the new reporting helpers into the
Streamlit visualizer. Rename Manual Inspection to Single Sample Analysis;
promote Token Error Rate and Accuracy to prominent metric tiles in both
tabs with a subtle category decomposition that sums to TER; auto-rerender
the single-sample view on sidebar toggles (no button). Batch Overall
Metrics mirrors the same layout and adds Category Analysis + Frequent
Errors sections. Domain config is now user-selectable from the sidebar
(Legal/Medical/Technical/From file/None). Refresh CLAUDE.md to document
the new modules, CLI flags, and terminology.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… config

- Remove frequent_errors_bar_chart from charts.py (tables are sufficient)
- Update batch_evaluate.py --chart flag to produce only category_breakdown.png
- Add .streamlit/config.toml with toolbarMode=minimal to hide Deploy button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reflect redesigned visualizer (Single Sample Analysis tab, auto-render,
  TER/Accuracy metric tiles, category breakdown chart, frequent-error tables,
  updated session state keys)
- Document new CLI flags (--analysis, --top-n, --chart) and analysis output
  files in docs/batch-processing.md
- Document error analysis Python API (aggregate_error_details,
  compute_error_summary, collect_error_details) with examples

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kavyamanohar
kavyamanohar merged commit 4e762b0 into main Apr 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant