Skip to content

v0.1.0

Latest

Choose a tag to compare

@AbdullahDiaa AbdullahDiaa released this 02 Aug 21:48

First tagged release of garabic — a set of functions for Arabic text processing in Go.

مكتبة برمجية توفر دوالاً للتعامل مع النصوص العربية في لغة برمجة go

Install

go get github.com/abdullahdiaa/garabic@v0.1.0

Highlights

  • NormalizationNormalize, RemoveHarakat for search- and index-friendly Arabic text.
  • Glyph shapingShape connects and reorders Arabic and Persian letters (پ چ ژ گ) for rendering on images and other non-RTL-aware surfaces.
  • JustificationJustify stretches Arabic lines with kashida (tatweel) to an exact rune width.
  • NumbersSpellNumber (numbers to Arabic words), plus ToArabicDigits / ToPersianDigits / ToEnglishDigits.
  • DiacriticsTashkeel adds matching diacritics (initial support).
  • HelpersIsArabic, IsArabicLetter.

Notable fixes in this release

  • Shape no longer misplaces diacritics on words combining tashkeel with a lam-alef ligature (لا / لأ / لإ / لآ).
  • Tashkeel no longer panics on sentences ending with a preposition.
  • Justify no longer panics on edge-case inputs; width math is rune-exact.
  • ToPersianDigits emits proper Persian codepoints (۰–۹) for all ten digits.

Full details in the CHANGELOG.

Requires Go 1.25+. Tested with race detector at 96% coverage.