detransliterator
Table of Contents
Installation
pip install detransliterator
Usage
as a software library
from detransliterator import Detransliterator
detransliterator = Detransliterator('latin2nqo_001.35')
latin = "musa dunbuya"
nqo = detransliterator.detransliterate(latin, beam_size=5)
assert nqo == "ߡߎߛߊ߫ ߘߎ߲ߓߎߦߊ"
as a console tool
# detransliteration tool
python -m detransliterator.tool --help
# csv/tsv extraction tool
python -m detransliterator.csv_tool --help
example: detransliterate a stream
echo "musa dunbuya" | python -m detransliterator.tool --model-name latin2nqo_001.35
example: extract a column from a csv file
cat test_csv_no_header.csv \
| python -m detransliterator.csv_tool \
extract-column --column-ix 1 \
> tmp_col1.txt
example: extract a column from a tsv file
cat test_tsv_with_header.tsv \
| python -m detransliterator.csv_tool \
extract-column --column-ix 1 --skip-lines 1 --csv-formatting-params delimiter tab \
> tmp_col2.txt
example: detransliterate a column from a csv file
cat test_tsv_no_header.tsv \
| python -m detransliterator.csv_tool extract-column --column-ix 1 \
--csv-formatting-params delimiter tab \
| python -m detransliterator.tool --model-name latin2nqo_001.35 \
> tmp_detransliterated_1.nqo
example: detransliterate a column from a tsv file
cat test_csv_with_header.csv \
| python -m detransliterator.csv_tool extract-column --column-ix 1 --skip-lines 1 \
| python -m detransliterator.tool --model-name latin2nqo_001.35 \
> tmp_detransliterated_2.nqo
example: use a particular GPU
CUDA_VISIBLE_DEVICES="1" echo "musa dunbuya" | python -m detransliterator.tool
Detransliteration Models
| Model | Source Script | Target Script | #Parameters | Validation BLEU | Test BLEU |
|---|---|---|---|---|---|
| latin2nqo_001.35 | latin | nqo | 2 520 576 | 75.56 | 74.14 |
| latin2nqo_001.38 | latin | nqo | 3 909 120 | 78.51 | 77.06 |
License
detransliterator is distributed under the terms of the MIT license.
Metadata
Release files for detransliterator 0.0.2
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 |
|---|---|---|---|---|
| detransliterator-0.0.2.tar.gz | 74.3 MB | Without provenance | Details for detransliterator-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| detransliterator-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for detransliterator-0.0.2-py3-none-any.whl |
Total release size: 148.6 MB
Release files / detransliterator-0.0.2.tar.gz
| Download URL | detransliterator-0.0.2.tar.gz |
|---|---|
| Size | 74.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e390b3c6c66a3adb9e89e37fcabd1947eb5794f3c32b8aa9b2bdc7a305ee289c
|
|
BLAKE2b-256 checksum How to use checksums |
2fbd3b1c8143d182f3af33ff0a170442da1f2d70103f046ad80cdbaa90b15b4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / detransliterator-0.0.2-py3-none-any.whl
| Download URL | detransliterator-0.0.2-py3-none-any.whl |
|---|---|
| Size | 74.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5bb046002502481a9c4b2dd39a61527adc14def7592aa365b0a9d2ac2d96d23
|
|
BLAKE2b-256 checksum How to use checksums |
7c320bf1b166a3fd87f720541856a23d327b494ab68c7f8ebef4fae411cce553
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for detransliterator 0.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.