k4black/codebleu

Pip compatible CodeBLEU metric implementation available for linux/macos/win

56
/ 100
Established

This tool helps evaluate the quality of computer-generated code by comparing it against a reference or 'ground truth' code. It takes in two pieces of code (one predicted, one reference) in languages like Python, Java, or C++, and outputs a comprehensive score indicating how grammatically and logically similar they are. This is used by researchers and developers working on code generation models to objectively measure their model's performance.

130 stars. Used by 1 other package. No commits in the last 6 months. Available on PyPI.

Use this if you are developing or evaluating code generation, code translation, or code summarization models and need a robust metric to compare model output to human-written code.

Not ideal if you are looking for a simple pass/fail test for code correctness, or if your primary goal is static code analysis for bugs and style rather than similarity assessment.

code-generation natural-language-processing-for-code code-translation software-engineering-research model-evaluation
Stale 6m
Maintenance 0 / 25
Adoption 11 / 25
Maturity 25 / 25
Community 20 / 25

How are scores calculated?

Stars

130

Forks

28

Language

Python

License

MIT

Last pushed

Mar 31, 2025

Commits (30d)

0

Dependencies

2

Reverse dependents

1

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/k4black/codebleu"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.