Skip to main content

PyPI version

Introduction

The goal of this tool is to apply Large Language Models operations to monolingual corpus to generate parallell corpus.

Uses cases:

  • Asking a model to translate, summarize, paraphrasing original sentence to be able to benchmark its performance
  • For corpus generation tasks from monolingual corpus, like for example, translated corpus.
  • When developing prompts for your application, enables to test the prompt over a list of sentence to do evaluations

You basically provide an input file and prompt and it generates a target corpus: Alt text

Quick start

For example, to use OpenAI ChatGPT to translate a file:

llm-to-corpus samples/eng.txt samples/fra.txt "translate to French"

To see models and options available:

llm-to-corpus --help

Usage

Evaluation with Chatgpt

Translate Flores200 corpus to evalute quality of Catalan translation

llm-to-corpus samples/flores200.eng chatgpt.txt "Translate to Catalan the following text:"
pip install sacrebleu
sacrebleu samples/flores200.cat -i chatgpt.txt -m bleu chrf --format text

Evaluation with Bloom

Translate Flores200 corpus to evalute quality of Catalan translation

llm-to-corpus samples/flores200.eng bloom.txt "Translate to Catalan the following text:" --model mt0-xxl-mt
pip install sacrebleu
sacrebleu samples/flores200.cat -i bloom.txt -m bleu chrf --format text

Metadata

Release files for llm-to-corpus 0.0.3

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

Source distribution (sdist)

Source distribution for llm-to-corpus 0.0.3
File Size Uploaded Provenance
llm-to-corpus-0.0.3.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-to-corpus 0.0.3
File Interpreter ABI Platform
llm_to_corpus-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / llm-to-corpus-0.0.3.tar.gz

Download URL llm-to-corpus-0.0.3.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4453cfffd3f53d532bbd7c3b01ec2699f9b6fe0d4add9d7060077bf350b21179
BLAKE2b-256 checksum
How to use checksums
fe76a18724e39fbbe4a6a2e85d5cf92580061e0a0bc130be66297795474169ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / llm_to_corpus-0.0.3-py3-none-any.whl

Download URL llm_to_corpus-0.0.3-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a26923b0dc2b545a2e42d2abc1fe10eef09c81a1897948398b0765291ebe79e
BLAKE2b-256 checksum
How to use checksums
9ab71c4e67ea009805c8b562d167223f462ef5d78a1eb7e687d0541a15d8b548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for llm-to-corpus 0.0.3

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.

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