بعض الخدمات البرمجية على نصوص اللغة العربية
A versatile library offering utility functions for processing and transforming Arabic text.
Can be used in Node.js and the browser.
- Tashkeel Removal: Easily remove Tashkeel from Arabic text.
- Tatweel Removal: Remove Tatweel character from Arabic phrases.
- Convert To Old Arabic: Transform Arabic text into old script.
- Convert To Old Arabic And Tashfeer Banned Words: Transform Arabic text into old script and replace Banned Arabic text with visually similar characters for encoding purposes. (Banned words are words that considered as hate speech in social media)
- Tashfeer: Replaces Arabic text with visually similar characters for encoding purposes.
- Tashfeer Banned Words: Replaces Banned Arabic text with visually similar characters for encoding purposes. (Banned words are words that considered as hate speech in social media)
- Remove Arabic Affixes: Removes listed prefixes and suffixes from letter/mark/number sequences, preserving interior whitespace, punctuation, and symbols. Retains the original word when the complete result has fewer than three Arabic letters. This heuristic can retain legitimate two-letter stems (e.g.
اليدstaysاليد) and still strip original letters in longer words; it is not morphological analysis. This function requires Unicode property escape support; other APIs do not acquire that requirement on import. Banned-word matching retains its previous stripping rules. - Word To Letters: Convert Arabic word to its pronounced letters.
- ... and more!
🌐 Try Arabic Services live in your browser · 📝 Seen Blog
For implementation details, examples, and known limitations, see the technical documentation.
Arabic-Services was designed to work in both the browser and NodeJS applications.
You can use the library directly in the browser via CDN using jsdelivr or unpkg, or download standalone bundle files from the latest GitHub Releases:
<!-- Via jsdelivr (Recommended) -->
<script src="https://cdn.jsdelivr.net/npm/arabic-services@1/dist/umd/arabic-services.umd.js"></script>
<!-- Or via unpkg -->
<script src="https://unpkg.com/arabic-services@1/dist/umd/arabic-services.umd.js"></script>
<script>
console.log(ArabicServices.removeTashkeel('الخَيْلُ وَاللّيْلُ وَالبَيْداءُ تَعرِفُني'));
// Output: 'الخيل والليل والبيداء تعرفني'
</script>Install the package via npm:
npm install arabic-servicesImport only the functions you need for maximum bundle size reduction:
import { removeTashkeel, removeTatweel, toOldArabic } from 'arabic-services';
console.log(removeTashkeel('الخَيْلُ وَاللّيْلُ وَالبَيْداءُ تَعرِفُني'));
// Output: 'الخيل والليل والبيداء تعرفني'ESM named imports can be tree-shaken by production bundlers. Importing the full default object retains the full API; CommonJS require does not provide native tree-shaking. The browser UMD bundle is also the full API. See bundle size reporting for reproducible package and bundle measurements.
Or import the full object:
import { ArabicServices } from 'arabic-services';const { removeTashkeel, ArabicServices } = require('arabic-services');
console.log(removeTashkeel('الخَيْلُ وَاللّيْلُ وَالبَيْداءُ تَعرِفُني'));
// Output: 'الخيل والليل والبيداء تعرفني'Arabic Services is made publicly available to provide a well tested and well documented library for processing and transforming Arabic text to all developers. We accept feature contributions provided that they are properly documented and include the appropriate unit tests.
- 🚀 If you want to contribute to this project and make it better with new ideas, your pull request is very welcomed.
- 📝 If you find any issue just put it in the repository issue section, thank you.
Please ⭐️ this repo and share it with others
This project is licensed under the GPL-3.0 License. See the LICENSE file for more details.
- 📩 Email: SeenDevelopment@gmail.com
- 🌎 Website