Skip to main content

A fully implemented Beta Code parser.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

betacode_parser-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

betacode_parser-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file betacode_parser-1.0.0.tar.gz.

File metadata

  • Download URL: betacode_parser-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for betacode_parser-1.0.0.tar.gz
Algorithm Hash digest
SHA256 89e49be02cb9dc7d910e7c1de84a78927cc7b974802eb79a9e041a923b34c4a0
MD5 60ebd5ef19cef9d57ad7eb9b9fb6f917
BLAKE2b-256 268aa49b9a9409fd17ebc2ab83aecb07bb42f89aae40bc6d93abae9d5742020c

See more details on using hashes here.

File details

Details for the file betacode_parser-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for betacode_parser-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8141c8944a60de43f930531e6b00712fbf6ad80f922d2ee1eeb7700b02ac121f
MD5 1e2540d54c87b31cfeea06e87b30e00c
BLAKE2b-256 9d68bf7414c5b6527aa01718640c48d97b7c0d8e5a1c643a0030d405c4297830

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page