Skip to main content

AbugidaNLP

Natural Language Processing tools and resources for Ethiopian languages.


Introduction

AbugidaNLP is an open-source library focused on developing NLP tools tailored to Ethiopian languages. The library aims to support tasks like calendar system conversion, numeral conversion, and transliteration between Ethiopic and Latin scripts. As one of the first steps towards bridging the gap in NLP tools for underrepresented languages, AbugidaNLP aspires to grow into a comprehensive toolkit for linguists, researchers, and developers.


Key Features

AbugidaNLP is currently in its infancy, offering:

  • Transliteration: Convert text between Ethiopic and Latin scripts.
  • Calendar System Conversion: Seamlessly convert dates between Ethiopic and Gregorian calendars.
  • Numeral System Conversion: Translate numbers between Ge'ez and Hindu-Arabic numeral systems.

Installation

Prerequisites

  • Python 3.10 or higher
  • pip

Installation

Install AbugidaNLP using pip:

pip install abugida

Quick Start

Here’s how to get started with AbugidaNLP:

from abugida import ScriptConverter  # Import the ScriptConverter class from AbugidaNLP

# Initialize the ScriptConverter
converter = ScriptConverter()

# Forward transliteration: Convert Ethiopic script to Latin script
result_fwd = converter.transliterate("በመተባበራችን", "fwd")
print(result_fwd)  # Output: bemetebaberacn

# Backward transliteration: Convert Latin script to Ethiopic script
result_bwd = converter.transliterate("merejawoc", "bwd")
print(result_bwd)  # Output: መረጃዎች

Explanation:

  1. Import the library: The ScriptConverter class handles script conversions.
  2. Initialize: Create an instance of the ScriptConverter to use its methods.
  3. Transliteration:
    • Use the "fwd" mode for Ethiopic to Latin conversion.
    • Use the "bwd" mode for Latin to Ethiopic conversion.

Calendar Conversion

from abugida import CalendarConverter

converter = CalendarConverter()

# Ethiopian Calendar (EC) to Gregorian Calendar (GC)
print(converter.convert("2017-04-29", "EC", "GC"))  # Output: 2025-01-07 (Genna)

# Gregorian Calendar (GC) to Ethiopian Calendar (EC)
print(converter.convert("2024-09-11", "GC", "EC"))  # Output: 2017-01-01 (Enkutatash)

# Pagume 6 exists only in leap years (years where year % 4 == 3)
print(converter.convert("2015-13-06", "EC", "GC"))  # Output: 2023-09-11

Dates are written as "YYYY-MM-DD", with Pagume as month 13. Conversion goes through the Julian Day Number using the Beyene-Kudlek algorithm, the same one used by ICU. Ethiopian dates use the Amete Mihret era, and Gregorian dates use the proleptic Gregorian calendar.

Numeral Conversion

from abugida import NumeralConverter

converter = NumeralConverter()

# Hindu-Arabic ("ha") to Ge'ez ("gz")
print(converter.convert(2017, "ha", "gz"))       # Output: ፳፻፲፯
print(converter.convert(100000000, "ha", "gz"))  # Output: ፼፼

# Ge'ez ("gz") to Hindu-Arabic ("ha")
print(converter.convert("፯፻፷፭፼፵፫፻፳፩", "gz", "ha"))  # Output: 7654321

Ge'ez numerals follow the CLDR %ethiopic rule set, so output matches ICU. When parsing, an explicit ፩ before ፻ or ፼ (as in ፩፻) is accepted, and malformed numerals such as ፻፻ raise a ValueError.


Documentation

Documentation for AbugidaNLP is under construction. Stay tuned for detailed usage examples and API references.


Contributing

We welcome contributions to AbugidaNLP! Whether it's improving documentation, adding new features, or fixing bugs, your help is valuable.

Steps to Contribute:

  1. Fork the repository.
  2. Create a new branch for your feature/bugfix.
  3. Submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

Special thanks to the following resources for their inspiration and insights:

Contact

For questions or support, please open an issue.

Metadata

Release files for abugida 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abugida 0.4.0
File Size Uploaded Provenance
abugida-0.4.0.tar.gz 14.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for abugida 0.4.0
File Interpreter ABI Platform
abugida-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / abugida-0.4.0.tar.gz

Download URL abugida-0.4.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
206bfab5643d866f877704be0f2f3c46558778861817b9792ba9ae0164b86d91
BLAKE2b-256 checksum
How to use checksums
b411ac585fef6ad8e8d4842d0f0163b627ce162bebcb223a09e852d378103835
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / abugida-0.4.0-py3-none-any.whl

Download URL abugida-0.4.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19fca76854e9ef103a9ba5ace1c304ecfc764fe18f9863d1507ca4183801f825
BLAKE2b-256 checksum
How to use checksums
8066e88d0f32cb87374141f83c98ad298d131c307fe2f6085056bf5ec13e05c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for abugida 0.4.0

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.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page