Code Monkey home page Code Monkey logo

mdanok / arajs Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 455 KB

An npm module that provides Arabic language processing capabilities for JavaScript applications, inspired by the popular Python package pyarabic. With arajs, developers can easily perform tasks such as Arabic text normalization, tokenization, and more.

Home Page: https://www.npmjs.com/package/arajs

License: MIT License

JavaScript 100.00%
arabic javascript nodejs pyarabic tokenization

arajs's Introduction

ARAJS

npm version enter image description here enter image description here enter image description here enter image description here enter image description here

This module provides various functions to process and analyze Arabic text and numbers

To check the package on npmjs click @npm here

Read the documentation here

Features

  • Strip characters from text (harakat, tashkeel, small, tatweel, shadda)
  • Normalize ligatures, hamzas, tehs, and alefs in text
  • Separate and join Arabic letters and marks
  • Check for shadda, vocalized words or text, Arabic strings, and Arabic ranges
  • Reduce tashkeel in text
  • Determine if a word is a valid Arabic word
  • Convert a number to its Arabic textual representation.
  • Extract Arabic number phrases from a given text.
  • Detect number words and phrases in a list of words and return a list of tags.
  • Convert an Arabic number in textual form to its numeric value.
  • Retrieve character order and name.
  • Arabic range generation.
  • Get characters at specific positions in a word.
  • Check if two words are vocalized similarly.
  • Check if a word matches a specific pattern (wazn).
  • Check if two words have similar shaddas.
  • and many more functions, ready to use.

Usage


First, install the module:

npm i arajs

or

npm install arajs

Secondlly, import the module:

const {number2text, stripTashkeel} =  require("arajs");

Now, you can use the various functions provided by the module to process and analyze Arabic text.

Example

const  number  =  232;

console.log(number2text(number)); // مئتان و إثنان و ثلاثون

  

const  text  =  'مَرْحَبًا بِكُمْ';

const  strippedText  =  stripTashkeel(text);

console.log(strippedText); // مرحبا بكم

Features to be implemented

  • Documentation for the package.

  • Names generating and extraction from text.

  • Names romanizition and translation.

  • Arabic verb conjugator.

  • Text Taskheel.

check the repo here
Read the documentation here

arajs's People

Contributors

mdanok avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

bloushi

arajs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.