po2dataset


Namepo2dataset JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
SummaryPython tool to extract sentences from po files and create language datasets for machine translation
upload_time2024-10-31 23:46:53
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright 2024 Urtzi Odriozola Lizaso Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords po dataset nlp argostranslate libretranslate language translation
VCS
bugtrack_url
requirements polib argparse tox requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PO2Dataset

[![PyPI version](https://badge.fury.io/py/po2dataset.svg)](https://badge.fury.io/py/po2dataset)
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/po2dataset.svg)](https://pypi.python.org/pypi/po2dataset/)
[![check](https://github.com/urtzai/po2dataset/actions/workflows/python-test.yml/badge.svg)](https://github.com/urtzai/po2dataset/actions/workflows/python-test.yml)

**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](https://github.com/argosopentech/argos-train).

## How to install

### From pip

```bash
pip install po2dataset
```

### Manual installation

Create a virtual environment using [virtualenv](https://virtualenv.pypa.io/en/latest/index.html)

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

## Quick start guide

### Create Argos Train suitable dataset

```bash
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](https://en.wikipedia.org/wiki/ISO_639))
- `target_code`: Target language code ([ISO 639](https://en.wikipedia.org/wiki/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**](https://creativecommons.org/publicdomain/zero/1.0/)). 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:

```bash
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:

```bash
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "po2dataset",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "po, dataset, NLP, argostranslate, libretranslate, language, translation",
    "author": null,
    "author_email": "Urtzi Odriozola <urtzi.odriozola@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1b/87/1901272a74408270a47bd452fe8336c359d3b1daab89ce2ceaa767093944/po2dataset-0.5.1.tar.gz",
    "platform": null,
    "description": "# PO2Dataset\n\n[![PyPI version](https://badge.fury.io/py/po2dataset.svg)](https://badge.fury.io/py/po2dataset)\n[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/po2dataset.svg)](https://pypi.python.org/pypi/po2dataset/)\n[![check](https://github.com/urtzai/po2dataset/actions/workflows/python-test.yml/badge.svg)](https://github.com/urtzai/po2dataset/actions/workflows/python-test.yml)\n\n**po2dataset** is a python tool to extract sentences from po files and create language datasets for machine translation.\n\nThis command line tool is intended to create dataset packages suitable for [Argos Train](https://github.com/argosopentech/argos-train).\n\n## How to install\n\n### From pip\n\n```bash\npip install po2dataset\n```\n\n### Manual installation\n\nCreate a virtual environment using [virtualenv](https://virtualenv.pypa.io/en/latest/index.html)\n\n```bash\ngit clone https://github.com/itzune/po2dataset.git\nvirtualenv po2dataset\ncd po2dataset\nsource ./bin/activate\n```\n\n## Quick start guide\n\n### Create Argos Train suitable dataset\n\n```bash\npo2dataset path/to/yourfile.po --name \"MyProject\" --source_code en --target_code eu --ref \"Some reference information of the project\"\n```\n\nWhere:\n\n- `name`: The name of the project\n- `source_code`: Source language code ([ISO 639](https://en.wikipedia.org/wiki/ISO_639))\n- `target_code`: Target language code ([ISO 639](https://en.wikipedia.org/wiki/ISO_639))\n- `ref`: Some reference information of the project\n\nOptional arguments:\n\n- `format`: Extension name of the zip file (default **argosdata**)\n- `license`: License to add into the package (default [**CC0**](https://creativecommons.org/publicdomain/zero/1.0/)). Options are: CC0, CC-BY, CC-BY-SA\n\n### Usage Examples\n\n#### Basic Dataset Creation\n\nTo create a dataset from a .po file for an English-Basque translation project, run:\n\n```bash\npo2dataset path/to/yourfile.po --name \"MyProject\" --source_code en --target_code eu --ref \"Translation dataset for project X\"\n```\n\n#### Specifying Format and License\n\nFor different file format and license, use:\n\n```bash\npo2dataset path/to/yourfile.po --name \"MyProject\" --source_code en --target_code eu --format \"zip\" --license \"CC-BY\"\n```\n\nThese commands create language dataset packages, with zip file format and CC-BY licensing options.\n\n## Support\n\nShould you experience any issues do not hesistate to post an issue or contribute in this project pulling requests.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright 2024 Urtzi Odriozola Lizaso  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python tool to extract sentences from po files and create language datasets for machine translation",
    "version": "0.5.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/urtzai/po2dataset/issues",
        "Changelog": "https://github.com/urtzai/po2dataset/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/urtzai/po2dataset/blob/main/README.md",
        "Homepage": "https://github.com/urtzai/po2dataset",
        "Repository": "https://github.com/urtzai/po2dataset"
    },
    "split_keywords": [
        "po",
        " dataset",
        " nlp",
        " argostranslate",
        " libretranslate",
        " language",
        " translation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d224ddd6a21e5dda4c81942658d7a28e4bea208340912df153fad69ce06b99f9",
                "md5": "68f8f3db9c2a3e673a0785116f071c67",
                "sha256": "1a1c9bd7a7570305e5a084f62b226a7470fd7d5dab80055e1a710783ea754545"
            },
            "downloads": -1,
            "filename": "po2dataset-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "68f8f3db9c2a3e673a0785116f071c67",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6862,
            "upload_time": "2024-10-31T23:46:52",
            "upload_time_iso_8601": "2024-10-31T23:46:52.122857Z",
            "url": "https://files.pythonhosted.org/packages/d2/24/ddd6a21e5dda4c81942658d7a28e4bea208340912df153fad69ce06b99f9/po2dataset-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b871901272a74408270a47bd452fe8336c359d3b1daab89ce2ceaa767093944",
                "md5": "b7c0df0ba8fbceca79d1cebfabe82b18",
                "sha256": "abfed5cd15eb49d46527f81121a1e8d64f818607e54d573685a87b57c5aed360"
            },
            "downloads": -1,
            "filename": "po2dataset-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b7c0df0ba8fbceca79d1cebfabe82b18",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7786,
            "upload_time": "2024-10-31T23:46:53",
            "upload_time_iso_8601": "2024-10-31T23:46:53.942737Z",
            "url": "https://files.pythonhosted.org/packages/1b/87/1901272a74408270a47bd452fe8336c359d3b1daab89ce2ceaa767093944/po2dataset-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-31 23:46:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "urtzai",
    "github_project": "po2dataset",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "polib",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "argparse",
            "specs": [
                [
                    "==",
                    "1.4.0"
                ]
            ]
        },
        {
            "name": "tox",
            "specs": [
                [
                    "==",
                    "4.23.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "po2dataset"
}
        
Elapsed time: 0.39177s