Skip to main content

A simple lightweight library for computing BLEU scores

Project description

bleuper

A simple lightweight library to help you easily compute BLEU scores.

Usage

from bleuper import BLEU
ref1 = ['love', 'can', 'always', 'find', 'a', 'way']
ref2 = ['love', 'makes', 'anything', 'possible']
tran1 = ['the', 'love', 'can', 'always', 'do']
tran2 = ['love', 'can', 'make', 'anything', 'possible']
b = BLEU([ref1, ref2], (0.4, 0.35, 0.25, 0, ))
score1 = b.compute_score(tran1)
score2 = b.compute_score(tran2)

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bleuper-0.2.tar.gz (5.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page