Giter VIP home page Giter VIP logo

arabic-dialect-identification's Introduction

arabic-dialect-identification

A model for arabic-dialect-identification.

The source code for the paper: ABDELMAJEED Mohammed and Murtadha, Ahmed, et al. "A Three-Stage Neural Model for Arabic Dialect Identification" [1].

Data

  • The datasets used in our experminents can be downloaded from MADAR, QADI and NADI
  • We have processed Nadi dataset datasets/Nadi/
  • The embeddings of Nadi dataset for both cbow58 and arabvec download and put them to embedding/
  • To build the embeddings and tokenizer of the other datasets:
    • download these models: * cbow58 * arabvec

    • unzip them into embedding/

Prerequisites:

Required packages are listed in the requirements.txt file:

pip install -r requirements.txt

Pre-processing

  • The data should be in the following format:
[
  {
      "text": "الفار العور يشوف فقط كيسي ومايشوف ماتويد",
      "label": "Iraq"
   }
]

Training:

  • To train Bert-based ADI:
    • Run the following code
     python train.py --dataset Nadi --baseline camel --device_group 0
    
    • The params could be :

      • --baseline ={camel,arbert, mdb}
      • --dataset ={Nadi,QADI,Corpus-6, Corpus-9, Corpus-26}
      • --device_group ="0" # GPU ID

The the results will be written into results_bert.txt

  • To train Word2vec-based ADI:
python train_LSTM.py --dataset Nadi --embeding cbow58 --device_group 0
  • The params could be :

    • --embeding={cbow58, arabvec}
    • --dataset ={Nadi,QADI,Corpus-6, Corpus-9, Corpus-26}
    • --device_group ="0" # GPU ID

The the results will be written into results_lstm.txt

If you use the code, please cite the paper:


arabic-dialect-identification's People

Contributors

amurtadha avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

seanigami

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.