I am working on a Quran application. I have text file(UTF-8
) of the Quran (in Arabic language). I want to search my Arabic word from the Quran. I want to write an Arabic word of Quran without Aarabs e.g. Zaber, Zair, shud, Mud and Paish.
Aarabs are basically Arabic vowels.
Arabic Aarabs detail
Following is the code to search the English word from my ArrayList
called testingarray
. But for Arabic it's not returning the correct word.
testingarray.get(Index).toString().trim().toLowerCase().contains(word.trim().toLowerCase())) {
Here the Arabic set table of the Unicode, It's more easy to use Regex to filter such complex text.
This is an example for short vowels removing in PHP (I'm not a java programmer)
text.preg_replace("/[\x{064B}-\x{065F}]/u","")
There are more other vowels in Noble Quran you may need to add their ranges.
Just to be more accurate you may need to Normalize the Arabic text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With