A Python package for bi-directional translation and substitution
Project description
A Python package for bi-directional translation and substitution, particularly useful for working with Voynich manuscript transcriptions.
Overview
PyVoynich is a Python implementation of the bitrans.c tool, which performs bi-directional translation/substitution based on a set of rules. The package is designed to be easy to use and integrate into Python applications. All the original C code and .bit files were written by René Zandbergen. For access to the original data and codebase, please visit René Zandbergen's site.
Key features:
- Bi-directional translation (forward and reverse)
- Support for complex rule sets with multiple characters
- Loading rules from files
- Saving rules to files
- Processing text files
Installation
# Clone the repository
git clone https://github.com/wjbmattingly/pyvoynich.git
cd pyvoynich
# Install the package
pip install -e .
Usage
Basic Usage
from pyvoynich.bitrans import Bitrans
from pyvoynich.data import STA_Eva_def, STA_Eva_Bint, Eva_Cuva, Curr_Eva_def
input_text = "tchor. ckhoiin. daiin. cphchar-"
bitrans1 = Bitrans(STA_Eva_def, direction=2)
output1 = bitrans1.translate(input_text)
print(f"Output: {output1}")
input_text_sta = "Q2K1A1C1.U1A3G1.B1A3G1.T1K1A3C1"
bitrans2 = Bitrans(STA_Eva_def, direction=1)
output2 = bitrans2.translate(input_text_sta)
print(f"Output: {output2}")
Available Rule Sets
The package includes several predefined rule sets:
STA_Eva_def: Standard EVA transliterationSTA_Eva_Bint: EVA to Beinecke transliterationEva_Cuva: EVA to Currier transliterationSTA_FSG_def: FSG transliterationSTA_Curr_def: Currier transliteration
Acknowledgements
This package is a Python implementation of the bitrans.c tool, originally developed for transliteration of the Voynich manuscript.
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 pyvoynich-0.1.0.tar.gz.
File metadata
- Download URL: pyvoynich-0.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afaefe92458b8d42a7859dfa931318479aa6389eea3f0ffb45a5776495c2d0da
|
|
| MD5 |
0dcd9f227d11fd1610c7843c624eab64
|
|
| BLAKE2b-256 |
0135b6a3d2808fd7b1e91d13a8fd2daa0bb628f024aee69737118ab5ec2392f3
|
File details
Details for the file pyvoynich-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyvoynich-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e5da4b4fe7000607c969842f503d9475b7e41220599623a1b218aa01abbbec9
|
|
| MD5 |
17629c05f65f74f4bd83c2f763bad741
|
|
| BLAKE2b-256 |
c30f0d73cebc02fe02ad3d25124d59b9cad09d5fc8662639b729681e25df00e2
|