Skip to main content

fidel-tools

Python port of Fidel Tools - Amharic language preprocessing toolkit.

License PyPI Version


Overview

fidel-tools is the Python package for the Fidel Tools NLP suite. It wraps the native Rust library (core-native) via maturin PyO3 bindings (PyNormalizer, PyTransliterator, PySentenceTokenizer, PyLexicalAnalyzer, and PyStemmer) with transparent pure-Python fallbacks. It provides symmetrical snake_case and camelCase APIs plus a spaCy tokenizer wrapper.


Features

  • Full Native Rust Core (PyO3): Fast native implementations for normalization (normalize, normalize_batch), transliteration, sentence tokenization, lexical analysis, and light stemming (~106,400 ops/s on medium paragraphs, 2.54x vs JS).
  • Word Tokenization & Ethiopic Numerals: word_tokenize (abbreviation-aware, hulet neteb ፡ support) and convert_numbers / ethiopic_to_arabic_number (፲፱፻፹፯ -> 1987).
  • Pythonic & JS Symmetrical APIs: Exposes both snake_case and camelCase methods on Pipeline, plus Pipeline.process(...) and is_native_enabled.
  • spaCy Integration: Drop-in get_spacy_tokenizer(nlp, pipeline) for spacy.blank("am").
  • Indexing & Term Weighting: Normalized document/query indexing and guarded TF-IDF weighting.

Installation

pip install fidel-tools

Quick Start

Basic Pipeline Usage

import fidel_tools as fidel

am_pack = fidel.get_amharic_pack()
nlp = fidel.Pipeline(am_pack)

normalized = nlp.normalize("ሐኪም ኀይሉ በልቷልልል!")
tokens = nlp.word_tokenize("በ2016 ዓ.ም. ት/ቤት ሄዱ።")
arabic = nlp.convert_numbers("በ፲፱፻፹፯ ዓ.ም. ፪፼ ብር")
cleaned = nlp.remove_stopwords("ያወጣውን የተጨማሪ እሴት")
stemmed = nlp.stem("ልጆቻቸውን")

print(normalized)  # "ሃኪም ሃይሉ በልቱዋልል!"
print(stemmed)     # "ልጅ"

spaCy Tokenizer Integration

import spacy
from fidel_tools import Pipeline, get_spacy_tokenizer, get_amharic_pack

nlp = spacy.blank("am")
pipeline = Pipeline(get_amharic_pack())
nlp.tokenizer = get_spacy_tokenizer(nlp, pipeline)

doc = nlp("ይህ የመጀመሪያው ዓረፍተ ነገር ነው።")
print([token.text for token in doc])

API Reference

Pipeline Methods

Supports both snake_case and camelCase signatures:

  • is_native_enabled (isNativeEnabled): Whether PyO3 Rust extensions are loaded.
  • normalize(text: str) -> str / normalize_batch(texts: list[str]) -> list[str]
  • sentence_tokenize(text: str) -> list[str]
  • word_tokenize(text: str) -> list[str]
  • convert_numbers(text: str) -> str
  • stem(word: str) -> str
  • remove_stopwords(corpus: str) -> str
  • lex_analyze(corpus: str) -> str
  • felig_transliterate(word: str, lang: str) -> str / sera_transliterate(word: str, lang: str) -> str
  • process(text: str, *, normalize=True, convert_numbers=False, remove_stopwords=True, stem_words=True) -> dict
  • index_documents(docs: list) -> dict / index_query(query: str) -> dict / weigh_terms(index: dict, type_of_index: str) -> dict

License

Licensed under the MIT License.

Metadata

Release files for fidel-tools 0.3.0

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

Built distributions (wheels)

Table of built distributions (wheels) for fidel-tools 0.3.0
File Actions
fidel_tools-0.3.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for fidel_tools-0.3.0-cp38-abi3-win_amd64.whl
fidel_tools-0.3.0-cp38-abi3-manylinux_2_34_x86_64.whl CPython 3.8 abi3 Linux glibc 2.34+ x86-64 Details for fidel_tools-0.3.0-cp38-abi3-manylinux_2_34_x86_64.whl
fidel_tools-0.3.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for fidel_tools-0.3.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
fidel_tools-0.3.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64 Details for fidel_tools-0.3.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Total release size: 1.6 MB

Release files / fidel_tools-0.3.0-cp38-abi3-win_amd64.whl

Download URL fidel_tools-0.3.0-cp38-abi3-win_amd64.whl
Size 223.7 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3f4cabfbd208a6a4b5187fabf805e0a8aee7a9ad099ba877465672df08a0235b
BLAKE2b-256 checksum
How to use checksums
0432220df83ec6493776632fa571ce7a6887a13ed1b063786dc6fe311e4572aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / fidel_tools-0.3.0-cp38-abi3-manylinux_2_34_x86_64.whl

Download URL fidel_tools-0.3.0-cp38-abi3-manylinux_2_34_x86_64.whl
Size 366.9 kB
Tags CPython 3.8 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
f8ef7b837e9fe2cb740bbee94b7804eb8ea23a4b0db88ffe4ad9d00e74412fea
BLAKE2b-256 checksum
How to use checksums
cf2c0824377dbf1cdc6ae87a56f8565ceae995e4de1cbfc13ed9c3e5267219e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / fidel_tools-0.3.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL fidel_tools-0.3.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 357.3 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
75483c1e8c255aa05fa6b9f22485f4c8fd76acdf7eae77251fba7fbd69603a6a
BLAKE2b-256 checksum
How to use checksums
d1be66c809ab546be25e036e7b0a579376757eda8cca838e5ead410ac172dd1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / fidel_tools-0.3.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Download URL fidel_tools-0.3.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
Size 618.1 kB
Tags CPython 3.8 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a28cce9b4b467fd0bb56856bdf9a44adcff3a21bae8c343c8ee4c4b9d55c1db1
BLAKE2b-256 checksum
How to use checksums
8c3522b47f16b0fc5606b2d2044c98fe684e7248da2a42a617f9fade74543eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for fidel-tools 0.3.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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for fidel_tools-0.3.0-cp38-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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