I want to filter my text by removing Arabic diacritics using Python.
For example:
Context | Text |
---|---|
Before filtering | اللَّهمَّ اغْفِرْ لنَا ولوالدِينَا |
After filtering | اللهم اغفر لنا ولوالدينا |
I have found that this can be done using CAMeL Tools but I am not sure how.
''.join(c for c in unicodedata.normalize('NFC', text) if unicodedata.category(c) != 'Mn')
– Rhythmandblues