Skip to main content

A fast bleu score calculator

Project description

bleuscore

bleuscore is a fast(maybe:) bleu score calculator base on Rust.

Quick Start

The usage is exactly same with huggingface evaluate:

- import evaluate
+ import bleuscore

predictions = ["hello there general kenobi", "foo bar foobar"]
references = [
    ["hello there general kenobi", "hello there !"],
    ["foo bar foobar"]
]

- bleu = evaluate.load("bleu")
- results = bleu.compute(predictions=predictions, references=references)
+ results = bleuscore.compute(predictions=predictions, references=references)

print(results)
# {'bleu': 1.0, 'precisions': [1.0, 1.0, 1.0, 1.0], 'brevity_penalty': 1.0, 
# 'length_ratio': 1.1666666666666667, 'translation_length': 7, 'reference_length': 6}

Project details


Download files

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

Source Distribution

bleuscore-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distributions

bleuscore-0.1.0-cp38-abi3-win_amd64.whl (713.6 kB view details)

Uploaded CPython 3.8+ Windows x86-64

bleuscore-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

bleuscore-0.1.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.7 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.5+ i686

bleuscore-0.1.0-cp38-abi3-macosx_11_0_arm64.whl (826.3 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

bleuscore-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl (874.7 kB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file bleuscore-0.1.0.tar.gz.

File metadata

  • Download URL: bleuscore-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for bleuscore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f7fdee89d35334581f2b476022c0010cfe08e2ac54ba5dd71402f438115afed3
MD5 0e45e939eec9b9fab1bf71772e1eb1c8
BLAKE2b-256 618cb455fefac23822143a29b64773fc3a45de69873c46f1f52f68752755f46e

See more details on using hashes here.

Provenance

File details

Details for the file bleuscore-0.1.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for bleuscore-0.1.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 eb6c9b33f0aca9f5b78c6800433c53db7de3ee81bb49c69f265d6364fd12dd2c
MD5 1425d98f3bb2d373ce0ed1338afffccd
BLAKE2b-256 5336178130616fab4c3286feb08f3de55f5a422fdb071baf83b7ff577e0fe74a

See more details on using hashes here.

Provenance

File details

Details for the file bleuscore-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bleuscore-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1e677ce59eb091b8e214d6f6dd3920ee79e268f25bc9928186cadb9ab9458b4
MD5 2f90dcd94694c1d4e624c6b0992fc4ca
BLAKE2b-256 4c26efb190d33bea7a603be727aebcbdcac68ca590583d636b954515bdc47b0f

See more details on using hashes here.

Provenance

File details

Details for the file bleuscore-0.1.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for bleuscore-0.1.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a7795cf1c2ecba45136e9c41aee173a43832d06e3b578350f2963dc5f59f5d24
MD5 3025b98ce699453baca41b146c0177c1
BLAKE2b-256 38f787ef13fa101628a98da0ed1b854b7318b1a7869c26a30fad25a275b9049a

See more details on using hashes here.

Provenance

File details

Details for the file bleuscore-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bleuscore-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b540a62a0c93dbefad9de88d00fdf3accd8211dd16c7a66bb14648debcf9c1c
MD5 94cab4ec423da30f6728b70e27beca97
BLAKE2b-256 4d6db4e00524f4e4e1ed41a02b1af5eb9b68cec39537fe8ea436cc46414bb7d9

See more details on using hashes here.

Provenance

File details

Details for the file bleuscore-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bleuscore-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0a07a25fd5af947a2cf10fb7f554b6bb9e549739bc728457cd1e858a379f362f
MD5 2a84db6ae319e138aebad712c0f91cfb
BLAKE2b-256 622f6b205588f3c24d54c2383fa6e00d444b48ea1548aac78b10f6df725d78ff

See more details on using hashes here.

Provenance

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