OPUS (opus.lingfil.uu.se) Python API
Project description
/$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$
/$$__ $$ | $$__ $$| $$ | $$ /$$__ $$
/$$$$$$$| $$ \ $$ /$$$$$$ | $$ \ $$| $$ | $$| $$ \__/
/$$_____/| $$ | $$ /$$__ $$| $$$$$$$/| $$ | $$| $$$$$$
| $$ | $$ | $$| $$ \__/| $$____/ | $$ | $$ \____ $$
| $$ | $$ | $$| $$ | $$ | $$ | $$ /$$ \ $$
| $$$$$$$| $$$$$$/| $$ | $$ | $$$$$$/| $$$$$$/
\_______/ \______/ |__/ |__/ \______/ \______/
OPUS (opus.lingfil.uu.se) Python API
Free software: MIT license
Documentation: https://opus-api.readthedocs.io.
Features
Get parallel corpora for src-target languages from OPUS, the online parallel corpus
JSON API
Caching for quick results
Command Line Interface
Filter corpora by range of desired total tokens
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.
History
0.1.0 (2017-10-03)
First release on PyPI.
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
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.5.tar.gz.
File metadata
- Download URL: opus_api-0.1.5.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76c108e8a6ae71c6a237b74a9348775a28238ffb74118823b75b5158f85862c4
|
|
| MD5 |
40f6cc5251dc84c457794b3b1b2bc08c
|
|
| BLAKE2b-256 |
df20d9fd0ea2b09158bde57e0958b08f006ac2a815c25c496e8e3f3449b3eb28
|
File details
Details for the file opus_api-0.1.5-py2.py3-none-any.whl.
File metadata
- Download URL: opus_api-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46faa1297a0b1989a62d261484f740bcebe2fe992bd085f48f3fdd60487558ff
|
|
| MD5 |
e7f9fe97115db32c3abaf6fce0ee870f
|
|
| BLAKE2b-256 |
85421d6d778fabd429ce7dee481887dbea09813e5b732a500f548b6a83750824
|