Skip to main content
Kreyolib Logo

"Kreyòl merite zouti tou · Kreyòl deserves tools too"

Python Version PyPI Coverage Status Stability Tests lint CodeFactor License: BSD 3-Clause Maintainer Open Source Love PRs Welcome

If you like this project, a star ⭐️ would mean a lot :)


Overview / Apèsi

Haitian Creole is spoken by millions of people, but it still lacks many of the language resources and tools available for larger languages. This project aims to build an open-source Ayiti NLP ecosystem focused on creating useful Natural Language Processing tools for Haitian Creole.

Most NLP progress has focused on high-resource languages, while Haitian Creole remains underrepresented. Creating better tools for Haitian Creole can help preserve the language, improve accessibility, and allow more Haitian developers and researchers to build AI applications.


Installation / Enstalasyon

pip install kreyolib -U

Usage / Itilizasyon

Normalization API

Orthography (API)

Standardizes chat slang, archaic spellings, clitics, and article usage into modern IPN orthography.

from kreyolib.normalize.orthography import standardize_text

# -- Chat slang & abbreviations --
standardize_text("Bjr! Mw tap tann ou sou ban an, svp cheri ou knn c fèt mwen jodi a.")
# Bonjou! Mwen tap tann ou sou ban an, silvouplè cheri ou konn se fèt mwen jodi a.

# -- Article correction --
standardize_text("Mwen chita sou ban a. Mwen ap manje bannann la ki te sou tab lan.")
# Mwen chita sou ban an. Mwen ap manje bannann nan ki te sou tab la.

# -- Capitalization fixes --
standardize_text("mwen renmen bondye")
# Mwen renmen Bondye

With aggressive=True, older historical variations and non-standard spellings are folded in as well:

standardize_text("Nan lé monn mouin té pèdu nan péché; Min Jézu té sové-m.", aggressive=True)
# Nan le mond mwen te pèdi nan peche; Men Jezi te sovem.

Contractions (API)

Expands colloquial clitics (m'ap, y'ap, n') into formal standalone words.

from kreyolib.normalize.contractions import expand_contractions

expand_contractions("M'ap ale lakay nou paske yap tann nou pou n' al travay.")
# Mwen ap ale lakay nou paske yo ap tann nou pou nou al travay.

Diacritics (API)

Removes accent marks — useful for search indexes or legacy systems that expect plain ASCII.

from kreyolib.normalize.diacritics import strip_diacritics

strip_diacritics("Abèy yo ap vole sou òganizasyon an lè yo ale nan fèt la.")
# Abey yo ap vole sou oganizasyon an le yo ale nan fet la.

Advanced Models & Intelligence

POS Tagger (API)

Built on Universal Dependencies treebanks (Autogramm, Adolphe) with custom preprocessing and French-based proper noun handling. See the Tagger Source Code for training details.

Tag a raw sentence:

from kreyolib.tagger.pos import tag

tag("Map vini demen nan maten pou n al travay ansanm.")
# [('M', 'PRON'), ('ap', 'AUX'), ('vini', 'VERB'), ('demen', 'NOUN'), ('nan', 'ADP'),
#  ('maten', 'NOUN'), ('pou', 'ADP'), ('n', 'PRON'), ('al', 'VERB'), ('travay', 'VERB'),
#  ('ansanm', 'ADV'), ('.', 'PUNCT')]

Or a pre-tokenized list:

tag(["Mwen", "rele", "Jan", ",", "e", "mwen", "abite", "Okay", "."])
# [('Mwen', 'PRON'), ('rele', 'VERB'), ('Jan', 'PROPN'), (',', 'PUNCT'), ('e', 'CCONJ'),
#  ('mwen', 'PRON'), ('abite', 'VERB'), ('Okay', 'NOUN'), ('.', 'PUNCT')]

Roadmap & Progress / Plan Travay

  • 1. Normalization & Preprocessing
    • Text standardization and modernization
    • Contraction expansion
    • Diacritics remover
    • Date, number, and text formatters
  • 2. Corpus & Datasets
    • Stop words and chat/informal abbreviations
    • Sentences, words, and chat abbreviation maps
    • Emoji maps with short Kreyòl description values
  • 3. Advanced Models & Intelligence
    • Part-of-Speech (POS) tagging engine
    • Named Entity Recognition for Haitian entities
    • Lexicon-based sentiment analysis engine
    • Next-word predictor
    • Regex and rule-based intent matching chatbot
  • 4. Tokenization & Segmentation
    • Word tokenizer
    • Sentence boundary splitter
    • Social media, tweet, mention, and hashtag tokenization
    • Subword tokenization via Byte-Pair Encoding and rules
  • 5. Phonetics & Syntax
    • Text-to-phonetics and IPA generation
    • CV syllabification engine
  • 6. Spelling & Error Correction
    • Levenshtein distance and spell-checking engine
  • 7. Core Architecture & Pipeline
    • Sequential execution pipeline runner

How People Can Contribute

For ways to contribute, see Contributing Guide.

This is a community-driven project to give Haitian Creole a stronger place in the AI and NLP ecosystem.

Download files

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

Source Distribution

kreyolib-0.1.0.tar.gz (274.3 kB view details)

Uploaded Source

Built Distribution

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

kreyolib-0.1.0-py3-none-any.whl (267.4 kB view details)

Uploaded Python 3

File details

Details for the file kreyolib-0.1.0.tar.gz.

File metadata

  • Download URL: kreyolib-0.1.0.tar.gz
  • Upload date:
  • Size: 274.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kreyolib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2eed51cf9c3417d6c59207dea2e003fbc7f14a191de475737487c4e972a972ec
MD5 23ce80a297d27864c652962a29d9008a
BLAKE2b-256 321ff1bb86e53d3a73800fe406a342556fb5f0f5546e7d5d649d492ecab32893

See more details on using hashes here.

File details

Details for the file kreyolib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kreyolib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 267.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kreyolib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5215be227f85b1438b428e202377f55ae0b0f5194a8a48d6002547996e5c046
MD5 5c7c912cece81084ef1c48f1873eded9
BLAKE2b-256 0b0c44cdc1507064d0c62c59b9d4538e87b5bcdfda29e221168b787a5070dc66

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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