Production-ready Kotlin utilities for Arabic text normalization, search, range mapping, highlighting, and numeral conversion on Android.
ArabicKit
0.2.0adds original-text search ranges, multiple-match support, and Android highlighting. The API is tested, but0.xreleases may still evolve before the first stable release.
- Remove Arabic diacritics and Quranic annotation marks.
- Remove tatweel.
- Normalize alef variants and alef maksura.
- Normalize whitespace and Latin casing.
- Search through normalized Arabic text.
- Return match ranges in the original UTF-16 source text.
- Find first, multiple, or overlapping normalized matches.
- Highlight normalized matches with Android
SpannableString. - Convert Western, Arabic-Indic, and Eastern Arabic-Indic digits.
- Java-friendly APIs through
@JvmStaticand@JvmOverloads. - A dependency-free Android sample app.
- Unit tests, Android Lint, GitHub Actions CI, and connected-device instrumentation coverage.
:arabickit— the Android library.:sample— a small XML + ViewBinding demonstration app.
./gradlew verifyFoundationOn Windows:
.\gradlew.bat verifyFoundationval normalized = ArabicNormalizer.normalize("إِنَّ الــلَّهَ غَفُورٌ")
// "ان الله غفور"val source = "إِنَّ اللَّهَ غَفُورٌ، إن الله رحيم"
val ranges = ArabicSearch.findAll(
text = source,
query = "ان الله",
)
ranges.forEach { range ->
println(source.substring(range.start, range.endExclusive))
}The returned offsets target the original source, including its diacritics and tatweel, so they can be used directly with substring or Android spans.
val highlighted = ArabicHighlighter.highlightBackground(
text = source,
query = "ان الله",
color = Color.YELLOW,
)
textView.text = highlightedval western = ArabicNumerals.convert(
input = "الإصدار ٢٠٢٦",
target = ArabicNumeralSystem.WESTERN,
)
// "الإصدار 2026"- Android minSdk 24
- compileSdk 37
- Java bytecode target 17
- Kotlin support is provided by Android Gradle Plugin built-in Kotlin.
The current release is v0.2.0. Binary AAR assets are available from GitHub Releases.
ArabicKit 0.2.0 delivers original-text search ranges and Android highlighting. The next planned release is 0.3.0, focused on advanced Arabic utilities. See ROADMAP.md, CHANGELOG.md, and the 0.2.0 implementation plan.
Read CONTRIBUTING.md before opening an issue or pull request.
Apache License 2.0. See LICENSE.