Skip to content

Conversation

@Jai0401
Copy link

@Jai0401 Jai0401 commented Feb 14, 2025

Fixes #1319

Add BLEU metric implementation to compute scores for each row and a summary BLEU metric for the dataset.

  • New BLEU Metric Implementation

    • Create src/evidently/metrics/bleu_metric.py to implement the BLEU metric.
    • Define BLEUMetricResult and BLEUMetric classes.
    • Implement BLEUMetricRenderer for HTML rendering of BLEU scores.
  • Integration with Existing Code

    • Update src/evidently/metric_preset/text_evals.py to include BLEU metric in the descriptors list.
    • Update src/evidently/metrics/__init__.py to import and reference the BLEU metric.
  • Testing

    • Add tests/metrics/test_bleu_metric.py to include tests for the BLEU metric.

Fixes evidentlyai#1319

Add BLEU metric implementation to compute scores for each row and a summary BLEU metric for the dataset.

* **New BLEU Metric Implementation**
  - Create `src/evidently/metrics/bleu_metric.py` to implement the BLEU metric.
  - Define BLEUMetricResult and BLEUMetric classes.
  - Implement BLEUMetricRenderer for HTML rendering of BLEU scores.

* **Integration with Existing Code**
  - Update `src/evidently/metric_preset/text_evals.py` to include BLEU metric in the descriptors list.
  - Update `src/evidently/metrics/__init__.py` to import and reference the BLEU metric.

* **Testing**
  - Add `tests/metrics/test_bleu_metric.py` to include tests for the BLEU metric.
@Jai0401 Jai0401 marked this pull request as draft February 15, 2025 12:19
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.

Add a new BLEU metric to Evidently

1 participant