Skip to content

FrederiqueRey/betacode-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

betacode-parser

Introduction

betacode-parser is a Python package that allows one to convert to and from Beta Code for Greek, Coptic, and Hebrew. It is implemented according to the standard of Thesaurus Linguae Graecae (TLG) as seen in this manual. In addition, the Hebrew conversion also supports the older CCAT (Center for Computer Analysis of Text, University of Pennsylvania) standard as seen on this webpage. This project is inspired by the PyPI package betacode, which only implemented conversion for Greek.

Installation

To install, run pip install betacode-parser. Import in projects like this:

from betacode_parser import *

Alternatively, you can import the following functions separately: beta_to_coptic, coptic_to_beta, beta_to_greek, greek_to_beta, beta_to_hebrew, and hebrew_to_beta.

Usage

# Greek
print(beta_to_greek("*A)RIS1TOTE/LHS")) # Ἀριστοτέλης
print(greek_to_beta("Ἀριστοτέλης")), # *A)RIS1TOTE/LHS2

# Coptic
print(beta_to_coptic("*PTOLEMAIOS")) # Ⲡⲧⲟⲗⲉⲙⲁⲓⲟⲥ
print(coptic_to_beta("Ⲡⲧⲟⲗⲉⲙⲁⲓⲟⲥ")) # *PTOLEMAIOS

# Hebrew
# Modern (TLG) Standard
print(beta_to_hebrew("ysrAl")) # ישראל
print(hebrew_to_beta("ישראל")) # ysrAl
# Old (CCAT) Standard
print(beta_to_hebrew("Y&R)L", True)) # ישׂראל
print(hebrew_to_beta("ישראל", True)) # Y#R)L

You can see how to transcribe to and from Beta Code manually in the TLG manual and CCAT webpage.

Development

Contributions are welcome.

About

A fully implemented Beta Code parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%