Documentation
¶
Overview ¶
Package arabic provides a set of functions for Arabic text processing in golang
Index ¶
Examples ¶
Constants ¶
View Source
const ( //Alef => ا Alef = '\u0627' //AlefMad => آ AlefMad = '\u0622' //AlefHamzaAbove => أ AlefHamzaAbove = '\u0623' //AlefHamzaBelow إ AlefHamzaBelow = '\u0625' //Yae => ي Yae = '\u064A' //DotlessYae => ى DotlessYae = '\u0649' //TehMarbuta => ة TehMarbuta = '\u0629' //Hae => ه Hae = '\u0647' //AlefWaslah ٱ / Waslah is considered part of harakat/تَشْكِيل ? AlefWaslah = '\u0671' )
Normalizable letters alef/Yae/Hae
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶
Normalize will prepare an arabic text to search and index
Example ¶
normalized := Normalize("أحمد") fmt.Println(normalized)
Output: احمد
func RemoveHarakat ¶
RemoveHarakat will remove harakat from arabic text
Example ¶
normalized := RemoveHarakat("سَنواتٌ") fmt.Println(normalized)
Output: سنوات
func SpellNumber ¶
SpellNumber will transform a number into a readable arabic version
Example ¶
numberInWords := SpellNumber(100) fmt.Println(numberInWords)
Output: مئة
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.