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.2.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.2.0
File Actions
fidel_tools-0.2.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for fidel_tools-0.2.0-cp38-abi3-win_amd64.whl
fidel_tools-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl CPython 3.8 abi3 Linux glibc 2.34+ x86-64 Details for fidel_tools-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl
fidel_tools-0.2.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for fidel_tools-0.2.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
fidel_tools-0.2.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 11.0+ ARM64, macOS 10.12+ x86-64 Details for fidel_tools-0.2.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Total release size: 1.5 MB

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

Download URL fidel_tools-0.2.0-cp38-abi3-win_amd64.whl
Size 216.8 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
56dc8159a13b4a666e658c893354e15dd74d8293ce6b30abc6d6288b5e8fed07
BLAKE2b-256 checksum
How to use checksums
da59e74c104a46caaea23cfcbe90f56d3e56ab16d87dfeeae979f4a177f1ad93
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.2.0-cp38-abi3-manylinux_2_34_x86_64.whl

Download URL fidel_tools-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl
Size 360.4 kB
Tags CPython 3.8 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
b8a3ea88d9734bfe09de364bda57555abb21af0e448212285efd9503904d3abb
BLAKE2b-256 checksum
How to use checksums
82b3597569803d38718942605ec8fb0651a29230e31615d20f8b480035114323
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.2.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL fidel_tools-0.2.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 351.5 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
8b78410d84bd5a62a68b186bcdb8ecacef91f5d76dabe22031df5d558f58f1d1
BLAKE2b-256 checksum
How to use checksums
1d47579a5297b96a140b36466036bb7419f0301f0f5b184243ac185d7d514840
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.2.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Download URL fidel_tools-0.2.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
Size 608.3 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
5c4c691a6e465fbcbde5aebbdf131dfd3bcd82c9c097d6063eacf6ddee914a43
BLAKE2b-256 checksum
How to use checksums
a04a2f8ef595b696cddc36f935d1321190b157e76863ffa018f28d1c69bd0bd1
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.2.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.2.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