Commit b68cc8a2 by Sherif

Cleaned up the docs, preparing for file IO in next version

parent 21e0125f
Showing with 20 additions and 6 deletions
...@@ -9,21 +9,26 @@ ...@@ -9,21 +9,26 @@
1. Launch in Python console 1. Launch in Python console
2. Use function 2. Use function
perstr("حاجة_بالعربي")
perstr("حاجة_بالعربي")
to return the romanization of حاجة\_بالعربي, or use to return the romanization of حاجة\_بالعربي, or use
perstr("حاجة_بالعربي", dictionary) perstr("حاجة_بالعربي", dictionary)
to return the romanization of حاجة\_بالعربي according to the system instructed by _dictionary_. to return the romanization of حاجة\_بالعربي according to the system instructed by _dictionary_.
### Issues: ### Issues:
* Currently depends on having the right diacritical marks to return short vowels properly, and will not detect vowels not explicitly written * Currently depends on having the right diacritical marks to return short vowels properly, and will not detect vowels not explicitly written
* See to-do list * See to-do list
##### Romanization bugs
* The ا (alef) is not pronounced as 'a' after a diacritic that is pronounced differently.
* Adjust output of الـ (al, the definite article) for sun and moon letters.
### To do: ### To do:
* Some kind of GUI * Some kind of GUI
* Integrate parts of Taha Zerrouki's [Mishkal](https://github.com/linuxscout/mishkal) to fix short vowel representation to some extent, or otherwise fix it somehow * Integrate parts of ~~Taha Zerrouki's~~ _ṭāha zerrūqī's_ [Mishkal](https://github.com/linuxscout/mishkal) to fix short vowel representation to some extent, or otherwise fix it somehow
* Make it easier to add user dictionaries * Make it easier to add user dictionaries
* Read from file? * Read from file?
* Optimize romanization of الـ * Add at least one more dictionary, فضحتنا.
\ No newline at end of file
#Last updated Oct 11, 2016. #Last updated Oct 17, 2016.
#Last lines in function editDict contain some unfinished functionality commented out. #Last lines in function editDict contain some unfinished functionality commented out.
#~Sherif #~Sherif
userin = open("testin.txt", "r")
userout = open("testout.txt", "w")
wehr = { #Dictionary using the Hans-Wehr transliteration system. wehr = { #Dictionary using the Hans-Wehr transliteration system.
'ا': 'ā', 'ا': 'ā',
'ب': 'b', 'ب': 'b',
...@@ -103,3 +106,10 @@ def romanize(ara, table = wehr): ...@@ -103,3 +106,10 @@ def romanize(ara, table = wehr):
continue continue
rom += table[ ara[i] ] rom += table[ ara[i] ]
return rom return rom
#commands used for testing go under this.
#print(romanize("طاهة زَرّوقي"))
#print( romanize( userin.read() ) )
#obligatory housekeeping
userin.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment