OPUS (opus.lingfil.uu.se) Python API
Project description
::
/$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$
/$$__ $$ | $$__ $$| $$ | $$ /$$__ $$
/$$$$$$$| $$ \ $$ /$$$$$$ | $$ \ $$| $$ | $$| $$ \__/
/$$_____/| $$ | $$ /$$__ $$| $$$$$$$/| $$ | $$| $$$$$$
| $$ | $$ | $$| $$ \__/| $$____/ | $$ | $$ \____ $$
| $$ | $$ | $$| $$ | $$ | $$ | $$ /$$ \ $$
| $$$$$$$| $$$$$$/| $$ | $$ | $$$$$$/| $$$$$$/
\_______/ \______/ |__/ |__/ \______/ \______/
.. image:: https://img.shields.io/pypi/v/opus-api.svg
:target: https://pypi.python.org/pypi/opus-api
.. image:: https://img.shields.io/travis/yonkornilov/opus-api.svg
:target: https://travis-ci.org/yonkornilov/opus-api
.. image:: https://readthedocs.org/projects/opus-api/badge/
:target: http://opus-api.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/yonkornilov/opus-api/shield.svg
:target: https://pyup.io/repos/github/yonkornilov/opus-api/
:alt: Updates
.. _OPUS: http://opus.lingfil.uu.se/
OPUS_ (opus.lingfil.uu.se) Python API
* Free software: MIT license
* Documentation: https://opus-api.readthedocs.io.
.. _requirements:
.. _PhantomJS: http://phantomjs.org/download.html
============
Requirements
============
Download PhantomJS_ and make sure its in your PATH, eg:
::
$ wget -qO- https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xvj -C ~/.local/bin --strip 2 phantomjs-2.1.1-linux-x86_64/bin
============
Installation
============
Stable release
--------------
To install Opus API, run this command in your terminal:
.. code-block:: console
$ pip install opus_api
This is the preferred method to install Opus API, as it will always install the most recent stable release.
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
>From sources
------------
The sources for Opus API can be downloaded from the `Github repo`_.
You can either clone the public repository:
::
$ git clone git://github.com/yonkornilov/opus_api
Or download the `tarball`_:
::
$ curl -OL https://github.com/yonkornilov/opus_api/tarball/master
Once you have a copy of the source, you can install it with:
::
$ python setup.py install
.. _Github repo: https://github.com/yonkornilov/opus_api
.. _tarball: https://github.com/yonkornilov/opus_api/tarball/master
=====
Usage
=====
Find your languages:
::
$ opus_api langs
[
...
{
"description": "en (English)",
"id": 69,
"name": "en"
},
...
{
"description": "ru (Russian)",
"id": 198,
"name": "ru"
}...
]
Find corpora:
::
$ opus_api get en ru --maximum 300 --minimum 3
{
"corpora": [
{
"id": 1,
"name": "OpenSubtitles2016",
"src_tokens": "157.5M",
"trg_tokens": "133.6M",
"url": "http://opus.lingfil.uu.se/download.php?f=OpenSubtitles2016%2Fen-ru.txt.zip"
},
...
{
"id": 13,
"name": "KDE4",
"src_tokens": "1.8M",
"trg_tokens": "1.4M",
"url": "http://opus.lingfil.uu.se/download.php?f=KDE4%2Fen-ru.txt.zip"
}
]
}
=======
Credits
=======
This package's CLI is powered by click_.
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _click: https://github.com/pallets/click
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2017-10-03)
------------------
* First release on PyPI.
0.1.7 (2017-10-07)
__________________
* Documentation released
/$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$
/$$__ $$ | $$__ $$| $$ | $$ /$$__ $$
/$$$$$$$| $$ \ $$ /$$$$$$ | $$ \ $$| $$ | $$| $$ \__/
/$$_____/| $$ | $$ /$$__ $$| $$$$$$$/| $$ | $$| $$$$$$
| $$ | $$ | $$| $$ \__/| $$____/ | $$ | $$ \____ $$
| $$ | $$ | $$| $$ | $$ | $$ | $$ /$$ \ $$
| $$$$$$$| $$$$$$/| $$ | $$ | $$$$$$/| $$$$$$/
\_______/ \______/ |__/ |__/ \______/ \______/
.. image:: https://img.shields.io/pypi/v/opus-api.svg
:target: https://pypi.python.org/pypi/opus-api
.. image:: https://img.shields.io/travis/yonkornilov/opus-api.svg
:target: https://travis-ci.org/yonkornilov/opus-api
.. image:: https://readthedocs.org/projects/opus-api/badge/
:target: http://opus-api.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/yonkornilov/opus-api/shield.svg
:target: https://pyup.io/repos/github/yonkornilov/opus-api/
:alt: Updates
.. _OPUS: http://opus.lingfil.uu.se/
OPUS_ (opus.lingfil.uu.se) Python API
* Free software: MIT license
* Documentation: https://opus-api.readthedocs.io.
.. _requirements:
.. _PhantomJS: http://phantomjs.org/download.html
============
Requirements
============
Download PhantomJS_ and make sure its in your PATH, eg:
::
$ wget -qO- https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xvj -C ~/.local/bin --strip 2 phantomjs-2.1.1-linux-x86_64/bin
============
Installation
============
Stable release
--------------
To install Opus API, run this command in your terminal:
.. code-block:: console
$ pip install opus_api
This is the preferred method to install Opus API, as it will always install the most recent stable release.
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
>From sources
------------
The sources for Opus API can be downloaded from the `Github repo`_.
You can either clone the public repository:
::
$ git clone git://github.com/yonkornilov/opus_api
Or download the `tarball`_:
::
$ curl -OL https://github.com/yonkornilov/opus_api/tarball/master
Once you have a copy of the source, you can install it with:
::
$ python setup.py install
.. _Github repo: https://github.com/yonkornilov/opus_api
.. _tarball: https://github.com/yonkornilov/opus_api/tarball/master
=====
Usage
=====
Find your languages:
::
$ opus_api langs
[
...
{
"description": "en (English)",
"id": 69,
"name": "en"
},
...
{
"description": "ru (Russian)",
"id": 198,
"name": "ru"
}...
]
Find corpora:
::
$ opus_api get en ru --maximum 300 --minimum 3
{
"corpora": [
{
"id": 1,
"name": "OpenSubtitles2016",
"src_tokens": "157.5M",
"trg_tokens": "133.6M",
"url": "http://opus.lingfil.uu.se/download.php?f=OpenSubtitles2016%2Fen-ru.txt.zip"
},
...
{
"id": 13,
"name": "KDE4",
"src_tokens": "1.8M",
"trg_tokens": "1.4M",
"url": "http://opus.lingfil.uu.se/download.php?f=KDE4%2Fen-ru.txt.zip"
}
]
}
=======
Credits
=======
This package's CLI is powered by click_.
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _click: https://github.com/pallets/click
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2017-10-03)
------------------
* First release on PyPI.
0.1.7 (2017-10-07)
__________________
* Documentation released
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
opus_api-0.1.8.tar.gz
(16.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opus_api-0.1.8.tar.gz.
File metadata
- Download URL: opus_api-0.1.8.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b94731db798c10916bd6b3541c6769bbe3dc880f2ba865acaaa42f0cc4f8a804
|
|
| MD5 |
99ba5575b701bedddc7f4a08a65f7101
|
|
| BLAKE2b-256 |
3a7c2c4b3d603d727510517185212c54fdaa4e7afcffd39e39e5ca0996f97eef
|
File details
Details for the file opus_api-0.1.8-py2.py3-none-any.whl.
File metadata
- Download URL: opus_api-0.1.8-py2.py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
245211e033a35e6c1db4568c084f8e1882358187de24c60fa04855450342ac55
|
|
| MD5 |
f979ea5281cf13aba63929622e5fa645
|
|
| BLAKE2b-256 |
b14d98f8ec9e4b33beb773698efa27ee3869383d36fefb1ed093776601ddf742
|