ARBML

Motivation

As you know machine learning has proven its importance in many fields, like computer vision, NLP, reinforcement learning, adversarial learning, etc .. Unfortunately, there is a little work to make machine learning accessible for Arabic-speaking people.

Goal

Our goal is to enrich the Arabic content by creating open-source projects and open the community eyes on the significance of machine learning. We want to create interactive applications that allow novice Arabs to learn more about machine learning and appreciate its advances.

Challenges

Arabic language has many complicated features compared to other languages. First, Arabic language is written right to left. Second, it contains many letters that cannot be pronounced by most foreigners like ض ، غ ، ح ، خ، ظ. Moreover, Arabic language contains special characters called Diacritics which are special characters that help readers pronounced words correctly. For instance the statement ` السَّلامُ عَلَيْكُمْ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ containts special characters after most of the letters. The diactrics follow special rules to be given to a certain character. These rules are construct a complete area called النَّحْوُ الْعَرَبِيُّ. Compared to English, the Arabic language words letters are mostly connected اللغة as making them disconnected is difficult to read ا ل ل غ ة`. Finally, there as many as half a billion people speaking Arabic which resulted in many dialects in different countires.

Procedure

Our procedure is generalized and can be generalized to many language models not just Arabic. This standrized approach takes part as multiple steps starting from training on colab then porting the models to the web.

Models

</td> </td> </td> </td>
Name Description Notebook Demo
Arabic Diacritization Simple RNN model ported from Shakkala
Arabic2English Translation seq2seq with Attention
Arabic Poem Generation CharRNN model with multinomial distribution
Arabic Words Embedding N-Grams model ported from Aravec
Arabic Sentiment Classification RNN with Bidirectional layer
Arabic Image Captioning Encoder-Decoder architecture with attention
Arabic Word Similarity Embedding layers using cosine similarity
Arabic Digits Classification Basic RNN model with classification head <img src="https://colab.research.google.com/assets/colab-badge.svg"height = '20px' >
Arabic Speech Recognition Basic signal processing and classification <img src="https://colab.research.google.com/assets/colab-badge.svg"height = '20px' >
Arabic Object Detection SSD Object detection model </td> </tr>
Arabic Poems Meter Classification Bidirectional GRU <img src="https://colab.research.google.com/assets/colab-badge.svg"height = '20px' > </td> </tr>
Arabic Font Classification CNN <img src="https://colab.research.google.com/assets/colab-badge.svg"height = '20px' > </td> </tr>
Arabic Text Detection Optical Character Recognition (OCR) </td> </tr> </table> ## Datasets
Name Description
Arabic Digits 70,000 images (28x28) converted to binary from Digits
Arabic Letters 16,759 images (32x32) converted to binary from Letters
Arabic Poems 146,604 poems scrapped from aldiwan
Arabic Translation 100,000 paralled arabic to english translation ported from OpenSubtitles
Product Reviews 1,648 reviews on products ported from Large Arabic Resources For Sentiment Analysis
Image Captions 30,000 Image paths with captions extracted and translated from COCO 2014
Arabic Wiki 4,670,509 words cleaned and processed from Wikipedia Monolingual Corpora
Arabic Poem Meters 55,440 verses with their associated meters collected from aldiwan
Arabic Fonts 516 100×100 images for two classes.
## Tools To make models easily accessible by contributers, developers and novice users we use two approaches ### Google Colab [Google colaboratory](https://colab.research.google.com/) is a free service that is offered by Google for research purposes. The interface of a colab notebook is very similar to jupyter notebooks with slight differences. Google offers three hardware accelerators `CPU, GPU` and `TPU` for speeding up training. We almost all the time use `GPU` because it is easier to work with and acheives good results in a reasonable time. Check this great [tutorial](https://medium.com/deep-learning-turkey/google-colab-free-gpu-tutorial-e113627b9f5d) on medium. ### TensorFlow.js TensorFlow.js is part of the TensorFlow ecosystem that supports training and inference of machine learning models in the browser. Please check these steps if you want to port models to the web: 1. Use keras to train models then save the model as `model.save('keras.h5')` 2. Install the TensorFlow.js converter using `pip install tensorflowjs` 3. Use the following script to `tensorflowjs_converter --input_format keras keras.h5 model/` 4. The `model` directory will contain the files `model.json` and weight files same to `group1-shard1of1` 5. Finally you can load the model using TensorFlow.js Check this [tutorial](https://medium.com/tensorflow/train-on-google-colab-and-run-on-the-browser-a-case-study-8a45f9b1474e) that I made for the complete procedure. ## Website We developed many models to run directly in the browser. Using TensorFlow.js the models run using the client GPU. Since the webpage is static there is no risk of privacy or security. You can visit the website [here](https://arbml.github.io/ARBML/Interfaces/Website/) . Here is the main intefrace of the website

The added models so far ### Poems Generation

### English Translation

### Words Embedding

### Sentiment Classification

### Image Captioning

### Diactrization

## Contribution Check the [CONTRIBUTING.md](https://raw.githubusercontent.com/zaidalyafeai/ARBML/master/CONTRIBUTING.md) for a detailed explanantion about how to contribute. ## Resources As a start we will start on Github for hosting the website, models, datasets and other contents. Unfortunately, there is a limitation on the space that will hunt us in the future. _Please let us know what you suggest on that matter_. ## Contributors Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

MagedSaeed

🎨 🤔 📦

March Works

🤔

Mahmoud Aslan

🤔 💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! ## Citation ``` @inproceedings{alyafeai-al-shaibani-2020-arbml, title = "{ARBML}: Democritizing {A}rabic Natural Language Processing Tools", author = "Alyafeai, Zaid and Al-Shaibani, Maged", booktitle = "Proceedings of Second Workshop for NLP Open Source Software (NLP-OSS)", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.nlposs-1.2", pages = "8--13", } ```