Skip to content

1.0.2

Choose a tag to compare

@AbdelrahmanBayoumi AbdelrahmanBayoumi released this 18 Nov 19:30

Version 1.0.2 2023-11-18 (04 Jumada al-awwal 1445)

New Feature:

  • Tashfeer Panned Words: Replaces Panned Arabic text with visually similar characters for encoding purposes. (Panned 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.

Installation

To install this library via NPM, use the following command:

npm install arabic-services

For browser usage, you can download .umd or .esm file, and you can find it attached to this release

Usage

Tashfeer Panned Words

const { ArabicServices } = require('arabic-services');
console.log(ArabicServices.tashfeerPannedWords('جيش العدو يقتل الأطفال'));
// Output: 'چـێـݭ !ڵعـݚۉ ی۪ـڨـټل الأطفال'

Remove Arabic Affixes

const { ArabicServices } = require('arabic-services');
console.log(ArabicServices.removeAffixes('المدرسة'));
// Output: مدرس

Full Changelog: v1.0.1...v1.0.2