Skip to main content

PO2Dataset

PyPI version PyPI Supported Python Versions check

po2dataset is a python tool to extract sentences from po files and create language datasets for machine translation.

This command line tool is intended to create dataset packages suitable for Argos Train.

How to install

From pip

pip install po2dataset

Manual installation

Create a virtual environment using virtualenv

git clone https://github.com/itzune/po2dataset.git
virtualenv po2dataset
cd po2dataset
source ./bin/activate

Quick start guide

Create Argos Train suitable dataset

po2dataset path/to/yourfile.po --name "MyProject" --source_code en --target_code eu --ref "Some reference information of the project"

Where:

  • name: The name of the project
  • source_code: Source language code (ISO 639)
  • target_code: Target language code (ISO 639)
  • ref: Some reference information of the project

Optional arguments:

  • format: Extension name of the zip file (default argosdata)
  • license: License to add into the package (default CC0). Options are: CC0, CC-BY, CC-BY-SA

Usage Examples

Basic Dataset Creation

To create a dataset from a .po file for an English-Basque translation project, run:

po2dataset path/to/yourfile.po --name "MyProject" --source_code en --target_code eu --ref "Translation dataset for project X"

Specifying Format and License

For different file format and license, use:

po2dataset path/to/yourfile.po --name "MyProject" --source_code en --target_code eu --format "zip" --license "CC-BY"

These commands create language dataset packages, with zip file format and CC-BY licensing options.

Support

Should you experience any issues do not hesistate to post an issue or contribute in this project pulling requests.

Metadata

Release files for po2dataset 0.5.1

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

Source distribution (sdist)

Source distribution for po2dataset 0.5.1
File Size Uploaded
po2dataset-0.5.1.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for po2dataset 0.5.1
File Interpreter ABI Platform
po2dataset-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / po2dataset-0.5.1.tar.gz

Download URL po2dataset-0.5.1.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
abfed5cd15eb49d46527f81121a1e8d64f818607e54d573685a87b57c5aed360
BLAKE2b-256 checksum
How to use checksums
1b871901272a74408270a47bd452fe8336c359d3b1daab89ce2ceaa767093944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2024.

Transparency log

Release files / po2dataset-0.5.1-py3-none-any.whl

Download URL po2dataset-0.5.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a1c9bd7a7570305e5a084f62b226a7470fd7d5dab80055e1a710783ea754545
BLAKE2b-256 checksum
How to use checksums
d224ddd6a21e5dda4c81942658d7a28e4bea208340912df153fad69ce06b99f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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