kBLOG

All things about Life, Oracle Middleware and Technology

Arabic Reshaper goes open source, codename “BAR=Better Arabic Reshaper”

| 124 Comments

bar1

Dear all,

Sorry for making you wait all this time, but I dont really have time, and some of my attempts to merge my work with some people failed.

So I thought of doing it the right way, and allow people to share the experience with me, and take advantage of the Arabic Reshaper, so I’m gonna put it on github and share the source code to whom it may concern!

And i’m gonna release my latest updated application, which still has some bugs, but I hope you can forgive me with that.

Update:The project has come to live, check out this link all http://bar.amr-gawish.com/

Update #2: The following project has code that enables Arabic Reshaping with Tashkeel (Harakat)  http://github.com/AhmedEssam/Better-Arabic-Reshaper

  • rehab

    asslamo alikom
    i want to ask if there is a way to access the sms messges with in application, becuse i tried too much but i could not do any thing till now, can you help me in that
    thanks alot
    rehab

  • rajab

    agawish, i managed to get it work on my HTC magic Android but still need some fixes espiecialy when thw text mixed with numbers or in a long text , it shows an error massage in some text.

    please keep the good job and waitin g for the final sofware.

    Rajab

  • rajab

    agawish, i managed to get it work on my HTC magic Android but still need some fixes espiecialy when thw text mixed with numbers or in a long text , it shows an error massage in some text.

    please keep the good job and waitin g for the final sofware.

    Rajab

  • mhd

    I have t-mobile G1 1.5 unfortunately my phone didn’t support the Arabic language! And have seen a video posted by you here shows that the Arabic language included in g1 phone, so is it an application I can download it? And from where can get it?
    I’ll highly appreciate your help for this issue.
    If this come with the phone itself , and no way to do so, what about if I want just read the Arabic letters while browsing internet , or reading my Arabic SMS because it comes out like squires only?
    Your help is urgently needed
    Thank you in advance.
    Dr. Mhd

  • mhd

    I have t-mobile G1 1.5 unfortunately my phone didn’t support the Arabic language! And have seen a video posted by you here shows that the Arabic language included in g1 phone, so is it an application I can download it? And from where can get it?
    I’ll highly appreciate your help for this issue.
    If this come with the phone itself , and no way to do so, what about if I want just read the Arabic letters while browsing internet , or reading my Arabic SMS because it comes out like squires only?
    Your help is urgently needed
    Thank you in advance.
    Dr. Mhd

  • pradeep

    I am working on localization of Urdu. I was looking for Reshaper similar to that of Arabic-Reshaper( a great job). Can I get any help regarding the same?

  • pradeep

    I am working on localization of Urdu. I was looking for Reshaper similar to that of Arabic-Reshaper( a great job). Can I get any help regarding the same?

  • http://blog.amr-gawish.com agawish

    I dont know If I can be much of a help, but I’ll search and update you.

  • http://blog.amr-gawish.com agawish

    I dont know If I can be much of a help, but I’ll search and update you.

  • Rashed Lootah

    Well im thinking of temp solution, what i really need is the web browser the msgs are fine for now, so why dont we modify the source code of the browser or we can use webview in android keep the fonts in the assets and then apply the reshaper somehow, maybe by storing the html locally then modify the arabic text by connecting it. im not sure if what im saying in the right track.

  • Rashed Lootah

    Well im thinking of temp solution, what i really need is the web browser the msgs are fine for now, so why dont we modify the source code of the browser or we can use webview in android keep the fonts in the assets and then apply the reshaper somehow, maybe by storing the html locally then modify the arabic text by connecting it. im not sure if what im saying in the right track.

  • http://bashar.com Bashar

    how to enable it on HTC Hero for example? any instructions?

    thank you

  • http://bashar.com Bashar

    how to enable it on HTC Hero for example? any instructions?

    thank you

  • Abdul

    I have mytouch 3G, and I’m using MacBook. How do I install Arabic-Reshaper?
    Thank you very much for such an effort.

  • Abdul

    I have mytouch 3G, and I’m using MacBook. How do I install Arabic-Reshaper?
    Thank you very much for such an effort.

  • salahaldin

    what is about browser in arabic

  • salahaldin

    what is about browser in arabic

  • http://blog.amr-gawish.com agawish

    Dear All, sorry for making you wait all this long.
    I’m so sorry about that, I’ve been extremely busy in work, and I’d like to inform you that I’ll be more active on regular basis from now on.

    I’ll be working on a new version of Arabic SMS Reader, and I’ll try to support the new Mobile devices.

    The working on Arabization of the whole system is done be Aman, you can find all the information you need from here
    https://sites.google.com/a/ut.utm.edu/arabic-android/

    unfortunately that google releases so many version of their android, so It’ll be hard to follow, but inshaAllah you will something good soon

    Thanks for your patience all :)

  • http://blog.amr-gawish.com agawish

    Dear All, sorry for making you wait all this long.
    I’m so sorry about that, I’ve been extremely busy in work, and I’d like to inform you that I’ll be more active on regular basis from now on.

    I’ll be working on a new version of Arabic SMS Reader, and I’ll try to support the new Mobile devices.

    The working on Arabization of the whole system is done be Aman, you can find all the information you need from here
    https://sites.google.com/a/ut.utm.edu/arabic-android/

    unfortunately that google releases so many version of their android, so It’ll be hard to follow, but inshaAllah you will something good soon

    Thanks for your patience all :)

  • Hamid

    Glad to see you have more time to work on this project. I have a Droid (running Android 2.0) and can’t wait to see the Arabic support on it.

    thanks for your efforts.

  • Hamid

    Glad to see you have more time to work on this project. I have a Droid (running Android 2.0) and can’t wait to see the Arabic support on it.

    thanks for your efforts.

  • jacket

    hi,
    do you know where I can download the TTF font file for connected arabic characters?
    Currently, the arabic font file only has deattached arabic form only.
    so I can’t see arabic character connected in my phone.

    Any idea?

  • jacket

    hi,
    do you know where I can download the TTF font file for connected arabic characters?
    Currently, the arabic font file only has deattached arabic form only.
    so I can’t see arabic character connected in my phone.

    Any idea?

  • http://blog.amr-gawish.com agawish

    You will find this font in the regular windows / Mac fonts folder
    Just grab whatever you like to use, and it should have an Arabic character representation, but connection characters doesn’t depend on font only, but It has to be made by hand.

  • http://blog.amr-gawish.com agawish

    You will find this font in the regular windows / Mac fonts folder
    Just grab whatever you like to use, and it should have an Arabic character representation, but connection characters doesn’t depend on font only, but It has to be made by hand.

  • Saleh

    Thanks guys for your efforts and time..

    well, I know that Aman and agawish are great developers… but the thing is that you speak a little pit of jargons, which is not understood by normal and unexperienced programming languages users :) ..

    plz make it more simple…

    I really appreciate your efforts in making Arabic lang. alive for Android, but I need from you to answer few questions if you dont mind of course..

    1. agawish you have said that connected Arabic characters has to be made by hand, so what is the process please..

    If you dont mind step by step to make things clear to us who are not good with IT stuff..

    Thanks for your time

  • Saleh

    Thanks guys for your efforts and time..

    well, I know that Aman and agawish are great developers… but the thing is that you speak a little pit of jargons, which is not understood by normal and unexperienced programming languages users :) ..

    plz make it more simple…

    I really appreciate your efforts in making Arabic lang. alive for Android, but I need from you to answer few questions if you dont mind of course..

    1. agawish you have said that connected Arabic characters has to be made by hand, so what is the process please..

    If you dont mind step by step to make things clear to us who are not good with IT stuff..

    Thanks for your time

  • http://blog.amr-gawish.com agawish

    Sure Saleh, I’ll explain it in a simple form.

    First you need to make the font understand the Arabic letters instead of making it squares, so that why we put a custom font in our applications to read those Arabic letters, but the problem remains Yes its Arabic letters indeed, but they are not connected!

    To connect them you have to actually know how many shapes the letter have, for example the “ل” character has 4 positions, like the following:
    “ل” “لـ” “ـلـ” “ـل”

    so you have to know in which position you should represent this “ل” if its a standalone or first of word, or end of word or in the middle of a word!

    So we make a big matrix with the letter and its positions and shapes, and whenever I find “ل” in the middle, I replace it with “ـلـ” and so on with the rest of letters.

    I hope that gives you a little brief on what was done.

    Ofcourse there are more sophisticated scenarios like “لا” and “الله”

    I hope I can get a hand to cover it all inshaAllah, and I recently added support to “لا” to my codebase

  • http://blog.amr-gawish.com agawish

    Sure Saleh, I’ll explain it in a simple form.

    First you need to make the font understand the Arabic letters instead of making it squares, so that why we put a custom font in our applications to read those Arabic letters, but the problem remains Yes its Arabic letters indeed, but they are not connected!

    To connect them you have to actually know how many shapes the letter have, for example the “ل” character has 4 positions, like the following:
    “ل” “لـ” “ـلـ” “ـل”

    so you have to know in which position you should represent this “ل” if its a standalone or first of word, or end of word or in the middle of a word!

    So we make a big matrix with the letter and its positions and shapes, and whenever I find “ل” in the middle, I replace it with “ـلـ” and so on with the rest of letters.

    I hope that gives you a little brief on what was done.

    Ofcourse there are more sophisticated scenarios like “لا” and “الله”

    I hope I can get a hand to cover it all inshaAllah, and I recently added support to “لا” to my codebase

  • Masoud

    Thanks for Arabic Reshaper class,

    It works great with normal text, but when I put Harakah like Fatha, Kasra and so on, again the characters appear separate. This is necessary for Quranic text. Can you help me about that?
    Thanks

  • Masoud

    Thanks for Arabic Reshaper class,

    It works great with normal text, but when I put Harakah like Fatha, Kasra and so on, again the characters appear separate. This is necessary for Quranic text. Can you help me about that?
    Thanks

  • Micho

    thanks a lot for your Software, But I’m new in android phones, Can you tell me how to install it on my Android
    by the way my mobile is T-mobile my touch 3G
    thanks in advance

  • Micho

    thanks a lot for your Software, But I’m new in android phones, Can you tell me how to install it on my Android
    by the way my mobile is T-mobile my touch 3G
    thanks in advance

  • Denis S.

    Salaam,

    I have a similar question as Masoud. Does anyone know of a project (or have code) that can properly display Quranic text (with all the tashkil being part of the word). So far the best option seems to pre-render text to images (on a separate machine), however that is not optimal for resizing.

    JAK,
    Denis S.

  • Denis S.

    Salaam,

    I have a similar question as Masoud. Does anyone know of a project (or have code) that can properly display Quranic text (with all the tashkil being part of the word). So far the best option seems to pre-render text to images (on a separate machine), however that is not optimal for resizing.

    JAK,
    Denis S.

  • ahmad

    please how i can adding Arabic to Alpha r22.1 – MoDaCo Custom ROM Desire Port with Online Kitchen (final Alpha) every time i try it goose unusable help please

  • ahmad

    please how i can adding Arabic to Alpha r22.1 – MoDaCo Custom ROM Desire Port with Online Kitchen (final Alpha) every time i try it goose unusable help please

  • moudavich

    Hello

    I ‘m working in supporting arabic in browser.Letters apper separated.

    I had download the kernel of android but I don’t now how to begin.

    Thanks

  • moudavich

    Hello

    I ‘m working in supporting arabic in browser.Letters apper separated.

    I had download the kernel of android but I don’t now how to begin.

    Thanks

  • http://uyghurandroid.blogbus.com qutbilik

    hello.! Aman and agawish
    i saw what u write about android in arabic. u did a lot about andriod.
    i am impressed..i am a student from xinjiang china and also a muslim.
    our language(Uyghur language) is most like yours , but compare to arabic ,our five letter is more than arabic. i download a ROM from this

    http://code.google.com/p/arabicandroid/downloads/list

    web site and update my android version. my celephone can recignize the arabic and browse the arabic web site. those letters(five letters i have just said ) are not normal .arabic alphebit has no those five letters which are : ى ې ڭ ە ھ code :0649 06D0 06AD 06D5 06BE
    can u help me to reciginze these letters and how can i add this five letter’s code on my language class. thanks .
    this is uyghur android == بۇ بولسا ئۇيغۇر ئاندرويىد

  • http://uyghurandroid.blogbus.com qutbilik

    hello.! Aman and agawish
    i saw what u write about android in arabic. u did a lot about andriod.
    i am impressed..i am a student from xinjiang china and also a muslim.
    our language(Uyghur language) is most like yours , but compare to arabic ,our five letter is more than arabic. i download a ROM from this

    http://code.google.com/p/arabicandroid/downloads/list

    web site and update my android version. my celephone can recignize the arabic and browse the arabic web site. those letters(five letters i have just said ) are not normal .arabic alphebit has no those five letters which are : ى ې ڭ ە ھ code :0649 06D0 06AD 06D5 06BE
    can u help me to reciginze these letters and how can i add this five letter’s code on my language class. thanks .
    this is uyghur android == بۇ بولسا ئۇيغۇر ئاندرويىد

  • Mumi

    Hallo/salam there…
    I like your(you and the others) work :0)
    Have you thought about improving your code?
    There are some design patterns which could speed up the reshape operation. I don’t know if the speed is an issue, but better performance is always good :0)
    If you made every character an static object(using inheritance and others tree structures) you could make every character reshape it self! (Object Oriented style!)… using hashmaps( Big O(1) – constant time) will make choosing the right object fast… And why divide the text in sentences… make it word basis… and every word will know how to represent it self – regardless of mix of eng/arabic characters.
    If you build the tree structure in the right way, this code could kick a** in performance!
    You could also consider decorator pattern… where you start with the first character and continue “decorating”… this will be very useful when you consider implementing “Harakah”…
    And for the Uyghur, Farsi or Urdu language… its just some more objects inheriting the basis stuff :0)
    I would like to help you coding and setting up the structure… i have just one problem – i cant read/write arabic… only in beginner level. I do speak it fluently ( i was raised in DK with no arabic school).
    I have both linux and windows skills… i code in c# and java… Just say the words and i will do want i can to help… This goes to Aman to!

  • Mumi

    Hallo/salam there…
    I like your(you and the others) work :0)
    Have you thought about improving your code?
    There are some design patterns which could speed up the reshape operation. I don’t know if the speed is an issue, but better performance is always good :0)
    If you made every character an static object(using inheritance and others tree structures) you could make every character reshape it self! (Object Oriented style!)… using hashmaps( Big O(1) – constant time) will make choosing the right object fast… And why divide the text in sentences… make it word basis… and every word will know how to represent it self – regardless of mix of eng/arabic characters.
    If you build the tree structure in the right way, this code could kick a** in performance!
    You could also consider decorator pattern… where you start with the first character and continue “decorating”… this will be very useful when you consider implementing “Harakah”…
    And for the Uyghur, Farsi or Urdu language… its just some more objects inheriting the basis stuff :0)
    I would like to help you coding and setting up the structure… i have just one problem – i cant read/write arabic… only in beginner level. I do speak it fluently ( i was raised in DK with no arabic school).
    I have both linux and windows skills… i code in c# and java… Just say the words and i will do want i can to help… This goes to Aman to!

  • http://www.google.com Sami

    Dear Agawish,

    I am a android user with a samsung Galaxy S 2.1.
    You are very technical for me a novice user :)
    is there a 1,2,3 baby steps you can explain to us please.
    If you please explain how to apply it to the system. I already added the fonts in system/fonts but it shows sperate letters (messages, notifications, facebook, browser). I dont want a specific one application to read arabic fro a specific purpose like your SMS aplication.
    I want to apply it to the whole system please.

    Samsung system have their system opensource
    http://opensource.samsung.com/
    under mobile>GT-I900

    There is no explanation in the whole intrenet on how to apply it on the system. every one is saying just reshape just reshape with the class…. and so on, and for the application.
    but there is no one explaining in baby steps for us learners. and we want it for the whole system.

    I know Samsung Galaxy S have custom ROM with Arabic but I dont want it.. I want my ROM and I want apply Arabic on it please.

    I know this is a hard request but I have high hopes with you :)
    thank you again

    Kind regards,
    Sami

  • http://www.google.com Sami

    Dear Agawish,

    I am a android user with a samsung Galaxy S 2.1.
    You are very technical for me a novice user :)
    is there a 1,2,3 baby steps you can explain to us please.
    If you please explain how to apply it to the system. I already added the fonts in system/fonts but it shows sperate letters (messages, notifications, facebook, browser). I dont want a specific one application to read arabic fro a specific purpose like your SMS aplication.
    I want to apply it to the whole system please.

    Samsung system have their system opensource
    http://opensource.samsung.com/
    under mobile>GT-I900

    There is no explanation in the whole intrenet on how to apply it on the system. every one is saying just reshape just reshape with the class…. and so on, and for the application.
    but there is no one explaining in baby steps for us learners. and we want it for the whole system.

    I know Samsung Galaxy S have custom ROM with Arabic but I dont want it.. I want my ROM and I want apply Arabic on it please.

    I know this is a hard request but I have high hopes with you :)
    thank you again

    Kind regards,
    Sami

  • Hadi

    Great work, would like to point just one thing..

    When you pass an empty string (“”) into the class and try getReshapedWord, an exception is thrown…

    I know it is not a big deal, and is easy to solve, just wanted to bring your attention into it…

    And btw, it is a very nice work, hope you the best…

  • Hadi

    Great work, would like to point just one thing..

    When you pass an empty string (“”) into the class and try getReshapedWord, an exception is thrown…

    I know it is not a big deal, and is easy to solve, just wanted to bring your attention into it…

    And btw, it is a very nice work, hope you the best…

  • http://blog.amr-gawish.com agawish

    Hi Sami, I believe there are some projects in google projects explaining those steps, I can’t tell you the steps because unfortunately I’m not an Android user :

    but your comment is here in case any one can help you with that

  • http://blog.amr-gawish.com agawish

    Hi Sami, I believe there are some projects in google projects explaining those steps, I can’t tell you the steps because unfortunately I’m not an Android user :\

    but your comment is here in case any one can help you with that

  • http://blog.amr-gawish.com agawish

    @Hadi Thanks, I believe it has been fixed by now :)