PO2Dataset
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 projectsource_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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| po2dataset-0.5.1.tar.gz | 7.8 kB | With provenance | Details for po2dataset-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| po2dataset-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for po2dataset-0.5.1-py3-none-any.whl |
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 logRelease 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 logSecurity for po2dataset 0.5.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for po2dataset-0.5.1.tar.gz
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 logA 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.