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.1.tar.gz (6.6 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.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: betacode_parser-1.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for betacode_parser-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1f972ad5d19af7b23fd500bcf0516cd811bfd42cbbbe994f25f95e5ad8e1de9c
MD5 baebe4492622f344f762b64968cf484b
BLAKE2b-256 acffe82388ff44070c71f8588ba7cf6aef9d4d67558a424057258a94ecf187e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for betacode_parser-1.0.1.tar.gz:

Publisher: python-publish.yml on vedrane/betacode-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for betacode_parser-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4c037425a68cb8b40e15c97f91152923c4b4aed8c0f2888068cc917279a4798
MD5 ab0b416990e791374317a451e01b5d9c
BLAKE2b-256 fb4101420fd0c3c6f8639d8815368ecc357181e022771efbd48c104458626473

See more details on using hashes here.

Provenance

The following attestation bundles were made for betacode_parser-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on vedrane/betacode-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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