Skip to main content

CrystalBLEU

Install

Install the requirements:

pip install crystalbleu

Usage

from collections import Counter
# Import CrystalBLEU
from crystalbleu import corpus_bleu

# Extract trivially shared n-grams
k = 500
frequencies = Counter(tokenized_corpus)
trivially_shared_ngrams = dict(frequencies.most_common(k))

# Calculate CrystalBLEU
crystalBLEU_score = corpus_bleu(
    references, candidates, ignoring=trivially_shared_ngrams)

Metadata

Release files for crystalbleu 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crystalbleu 0.2
File Size Uploaded Provenance Actions
crystalbleu-0.2.tar.gz 12.0 kB Without provenance Details for crystalbleu-0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crystalbleu 0.2
File Interpreter ABI Platform Actions
crystalbleu-0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for crystalbleu-0.2-py2.py3-none-any.whl

Total release size: 24.6 kB

Release files / crystalbleu-0.2.tar.gz

Download URL crystalbleu-0.2.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
883a745259a69cf3b089044ed375702e57bcdc00b3f2454842ca6f7f9b900b8e
BLAKE2b-256 checksum
How to use checksums
05f9e57c344501790f8638f9662edeff7de95b7e00d61ed41805b5c018e04bab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / crystalbleu-0.2-py2.py3-none-any.whl

Download URL crystalbleu-0.2-py2.py3-none-any.whl
Size 12.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0eb9c47ee0bb953faec0e9017e732188d0297026da669d1b7942b0a1c3e4ef58
BLAKE2b-256 checksum
How to use checksums
2225fa83423e31c5b3ec2199a716c87467df7e12d8822145774d5269ca0b53e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Security for crystalbleu 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page