Skip to content
Abdelrahman Bayoumi edited this page Nov 30, 2023 · 3 revisions

Welcome to the Arabic Services JavaScript Wiki!

Arabic Services JavaScript is a versatile library offering utility functions for processing and transforming Arabic text. It is designed to be used in both Node.js and browser environments.

๐Ÿ“‹ Features

Here's a quick overview of what you can do with Arabic Services:

  • 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 predefined affixes (prefixes and suffixes) from an Arabic word if it starts or ends with those affixes.
  • Word To Letters: Convert Arabic word to its pronounced letters.
  • ... and more!

๐Ÿš€ Getting Started

Arabic-Services was designed to work in both the browser and NodeJS applications.

Browser

We provide both ESM and UMD bundles for use in the browser. You can find it with the latest release files.

<script src="arabic-services.umd.js"></script>
<script>
	console.log(ArabicServices.removeTashkeel('ุงู„ุฎูŽูŠู’ู„ู ูˆูŽุงู„ู„ู‘ูŠู’ู„ู ูˆูŽุงู„ุจูŽูŠู’ุฏุงุกู ุชูŽุนุฑูููู†ูŠ'));
	// Output: 'ุงู„ุฎูŠู„ ูˆุงู„ู„ูŠู„ ูˆุงู„ุจูŠุฏุงุก ุชุนุฑูู†ูŠ'
</script>

NodeJS

Both CommonJS and ES Module libraries are provided.

npm install arabic-services

CommonJS:

const { ArabicServices } = require('arabic-services');
console.log(ArabicServices.removeTashkeel('ุงู„ุฎูŽูŠู’ู„ู ูˆูŽุงู„ู„ู‘ูŠู’ู„ู ูˆูŽุงู„ุจูŽูŠู’ุฏุงุกู ุชูŽุนุฑูููู†ูŠ'));
// Output: 'ุงู„ุฎูŠู„ ูˆุงู„ู„ูŠู„ ูˆุงู„ุจูŠุฏุงุก ุชุนุฑูู†ูŠ'

ES Module:

import { ArabicServices } from 'arabic-services';
console.log(ArabicServices.removeTashkeel('ุงู„ุฎูŽูŠู’ู„ู ูˆูŽุงู„ู„ู‘ูŠู’ู„ู ูˆูŽุงู„ุจูŽูŠู’ุฏุงุกู ุชูŽุนุฑูููู†ูŠ'));
// Output: 'ุงู„ุฎูŠู„ ูˆุงู„ู„ูŠู„ ูˆุงู„ุจูŠุฏุงุก ุชุนุฑูู†ูŠ'

๐Ÿ“œ License

This project is licensed under the GPL-3.0 License. See the LICENSE file for more details.

๐Ÿ’ฌ Need Help?

If you have any questions or need further assistance, please don't hesitate to contact us: