Git Product home page Git Product logo

khalidt / nour Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 33 KB

Nour is a tool that translates Arabic words, letters, or sentences to and from Braille notations.

Home Page: https://github.com/khalidt/Nour

License: GNU General Public License v3.0

Python 100.00%
braille braille-notation translates-arabic nour gplv3 arabicbraille arabic-translations arabic-braille converter conversion converter-app python3-library arabic-language arabic-conversion sentences letters

nour's Introduction

Description 🐋

Nour is an Arabic Braille tool that converts Arabic words, letters, or sentences to and from Braille notations. Nour has used the unified braille standard for Arabic that was developed at a conference in Saudi Arabia in 2002. However, some other Arab countries in 2013 do not sign it up thus they use a different standard of braille notation which will be added in the next version of Nour. based on the world Braille usage we added the unified braille standard for Arabic and we will add other Arab countries standards.

Sample:

From inside python shell:

>>> from Nour import nour
>>> nour.arabicToBraille('بسم الله الرحمن الرحيم')
>>> nour.brailleToArabic('⠍⠗⠱⠃⠁')
>>> nour.util.brailles
>>> nour.util.arabic

Output:

⠃⠎⠍⠀⠁⠇⠇⠓⠀⠁⠇⠗⠱⠍⠝⠀⠁⠇⠗⠱⠊⠍
مرحبا
['⠀', '\n', '⠁', '⠃', '⠞', '⠹', '⠚', '⠱', '⠭', '⠙', '⠮', '⠗', '⠵', '⠎', 
  '⠩', '⠯', '⠫', '⠾', '⠿', '⠷', '⠣', '⠋', '⠟', '⠅', '⠇', '⠍', '⠝', '⠓', 
  '⠡', '⠺', '⠊', '⠕', '⠉', '⠧', '⠴⠠', '⠌', '⠨', '⠜', '⠪', '⠳', '⠽', '⠄', 
  '⠥', '⠂', '⠆', '⠑', '⠔', '⠢', '⠒', '⠠', '⠐', '⠰', '⠐⠂', '⠶', '⠦…', '…⠴', 
  '⠠⠦', '⠐⠦', '⠴⠂', '⠲', '⠖', '⠦', '⠤', '⠼⠁', '⠼⠃', '⠼⠉',
  '⠼⠙', '⠼⠑', '⠼⠋', '⠼⠛', '⠼⠓', '⠼⠊', '⠼⠚', '⠒⠏']
 
[' ', '\n', 'ا', 'ب', 'ت', 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'س', 
  'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ك', 'ل', 'م', 'ن', 'ه', 'ة', 
  'و', 'ي', 'ى', 'ال', 'لا', ']', 'أ', 'إ', 'آ', 'أو', 'ؤ', 'ئ', 'ء', 'ُ', 
  'َ', 'ً', 'ِ', 'ٍ', 'ٌ', 'ْ', 'ّ', '،', '؛', ':', '"', '(', ')', '[', '{', 
  '}', '.', '!', '؟', '-', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩', '٠', 
  '٪']

From CLI:

python nour -br ⠞

output:

ت

Requirements

  • Python3 >=3.6

Installation:

  • Install from pip:

    Use the package manager pip to install Nour.
pip install Nour

Usage:

usage: Nour [-h] [-ar ARTEXT] [-br BRTEXT] [-arf ARFILE]           
            [-brf BRFILE] [-o] [-p] [-info]                        
                                                                   
optional arguments:                                                
  -h, --help            show this help message and exit            
  -ar ARTEXT, --artext ARTEXT                                      
                        The Arabic text to be converted to         
                        Braille.                                   
  -br BRTEXT, --brtext BRTEXT                                      
                        The Braille text to be converted to        
                        Arabic.                                    
  -arf ARFILE, --arfile ARFILE                                     
                        The Arabic text file to be converted to    
                        Braille.                                   
  -brf BRFILE, --brfile BRFILE                                     
                        The Braille text file to be converted to   
                        Arabic.                                    
  -o, --out             Write Conversion to file                   
  -p, --print           Print Standard Arabic Braille Code.        
  -info, --info         Print Information about Nour.              
                                                                   
Examples:                                                          
Nour -p                                                            
Nour -ar مرحبا                                                     
Nour -ar arabicTextFile.txt                                        
Nour -arf readFromtext.txt -o                                      
Nour -br ⠓                                                         
Nour -brf brailleTextFile.txt                                      
Nour -arf ArTextFile.txt -abf BrTextFile.txt        

Notes:

  • The character that is not in the standard of Arabic Braille code, will be ignored and replaced by space ' '. for Example: ~ , ^ , ' , & , /
  • Arithmetic and Logic operators are not supported yet.
  • Both the Arabic numerals (1,2,3 ...etc) and Eastern Arabic numerals (Hindi) (١,٢,٣ ... etc) are used by the same Arabic Braille code.
  • Underline is not tested but it's included!
  • When using the argument of output file ' -o ' it creates a file and writes the conversion to it, the generated file will be named by default as 'Nour %d-%m-%y %H-%M'.txt. Ex: Nour 02-10-2020 08-12.txt.
  • The only file that is supported for reading and writing is text .txt

Roadmap:

  • Add other Arab countries braille standards.
  • Import different files to read from and write to such as:
    • .docx , .doc, .rtf, .pdf, .html, .odt, xml and more.
  • New feature will be added which is converting the Arabic alphabets in images and extract them to the document file.
  • Add mechanism to deal with shapes, Maps ... etc.
  • Add Math translation for Nemeth and more.

License

GPL3v

Nour is a tool which translates Arabic words, letters 
or sentences to and from  Braille notations.
Copyright (C) 2020  Khalid Alkhaldi

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

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.