Command line usage
Install the gem and see the help message by executing:
$ gem install precise
$ precise -h
Arabicise a string of Romanisation:
$ precise -T 'bi-smi llāhi al-raḥmani al-raḥīm' # -T removes Tashkeel
Romanise a string of Arabic (experimental):
$ precise 'بسم الله الرحمن الرحيم' # (not able to infer Tashkeel!)
As a library
Install the gem and add to your Gemfile by executing:
$ bundle add precise
$ bundle install
You can then access the API like so:
require 'precise'
Precise::Transcription.reverse 'bi-smi llāhi al-raḥmani al-raḥīm'
Precise::Transcription.transcribe 'ﺐﺴﻣ ﺎﻠﻠﻫ ﺎﻟﺮﺤﻤﻧ ﺎﻟﺮﺤﻴﻣ'
Development
After checking out the repository, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
Issues and PRs are welcome!
Funding
This Gem was developed within the long-term research project Bibliotheca Arabica hosted at the Saxon Academy of the Sciences and Humanities in Leipzig, Germany. Bibliotheca Arabica is part of the German Academies’ Programme and funded by the Federal Republic of Germany and the Free State of Saxony.