Skip to content

TURJUMAN, a neural toolkit for translating from 20 languages into Modern Standard Arabic (MSA).

License

Notifications You must be signed in to change notification settings

UBC-NLP/turjuman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



GitHub release Documentation GitHub license Documentation Status GitHub stars GitHub forks

AraT5

Turjuman is a neural machine translation toolkit. It translates from 20 languages into Modern Standard Arabic (MSA). Turjuman is described in this paper: TURJUMAN: A Public Toolkit for Neural Arabic Machine Translation.

Turjuman exploits our AraT5 model. This endows Turjuman with a powerful ability to decode into Arabic. The toolkit offers the possibility of employing a number of diverse decoding methods, making it suited for acquiring paraphrases for the MSA translations as an added value.


Requirements and Installation

  • To install turjuman and develop directly using pip:
    pip install -U turjuman
  • To install turjuman and develop directly GitHub repo using pip:
    pip install -U git+https://github.com/UBC-NLP/turjuman.git
  • To install turjuman and develop locally:
    git clone https://github.com/UBC-NLP/turjuman.git
    cd turjuman
    pip install .

Getting Started

The full documentation contains instructions for getting started, translation using diffrent methods, intergrate Turjuman with your code, and provides more examples.

Colab Examples

(1) Command Line Interface

Command ContentColab link
turjuman_translate
  • Usage and Arguments
  • Translate using greedy search
  • Translate using beam search (default)
  • Translate using sampling search
  • Read and translate text from file
colab
turjuman_interactive
  • Usage and Arguments
  • Examples
colab
turjuman_score
  • Usage and Arguments
  • Input files format
  • Example
colab

(2) Integrate Turjuman with your python code

Functions ContentColab link
translate
translate_from_file
  • Install Turjuman
  • Initial turjuman object
  • Translate using greedy search
  • Translate using beam search (default)
  • Translate using sampling search
  • Read and translate text from file
colab

License

turjuman(-py) is Apache-2.0 licensed. The license applies to the pre-trained models as well.

Citation

If you use TURJUMAN toolkit or the pre-trained models for your scientific publication, or if you find the resources in this repository useful, please cite our paper as follows (to be updated):

@inproceedings{nagoudi-osact5-2022-turjuman,
  title={TURJUMAN: A Public Toolkit for Neural Arabic Machine Translation},
  author={Nagoudi, El Moatez Billah and Elmadany, AbdelRahim and Abdul-Mageed, Muhammad},
  booktitle = "Proceedings of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT5)",
  month = "June",
  year = "2022",
  address = "Marseille, France",
  publisher = "European Language Resource Association",
}

Acknowledgments

We gratefully acknowledge support from the Natural Sciences and Engineering Research Council of Canada (NSERC; RGPIN-2018-04267), the Social Sciences and Humanities Research Council of Canada (SSHRC; 435-2018-0576; 895-2020-1004; 895-2021-1008), Canadian Foundation for Innovation (CFI; 37771), ComputeCanada (CC), UBC ARC-Sockeye and Advanced Micro Devices, Inc. (AMD). Any opinions, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of NSERC, SSHRC, CFI, CC, AMD, or UBC ARC-Sockeye.