Skip to content

Implement BLEU score evaluation for NLP tests #6537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 27, 2025
Merged

Conversation

peterwald
Copy link
Member

@peterwald peterwald commented Jun 23, 2025

Add a new library for algorithmic NPL scoring evaluators, named Microsoft.Extensions.AI.Evaluation.NLP.

The first such evaluator that is implemented is BLEU. For this implementation we default to 4 even weights for the n-gram comparisons and we use the smoothing method 4 from Chen and Cherry (2014) for sentence-level BLEU scores. These are the same defaults chosen by the Azure python evaluation SDK.

Also included is a simple word tokenizer based on the tokenizers used for other BLEU implementations, such as MOSES, SacreBLEU and NLTK.

Microsoft Reviewers: Open in CodeFlow

@peterwald peterwald requested a review from a team as a code owner June 23, 2025 21:55
@github-actions github-actions bot added the area-ai-eval Microsoft.Extensions.AI.Evaluation and related label Jun 23, 2025
This was referenced Jul 28, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai-eval Microsoft.Extensions.AI.Evaluation and related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants