Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2012, 03:44 PM   #1
Bassam Jarad
Junior Member
Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.
 
Posts: 6
Karma: 286
Join Date: Apr 2012
Device: Kindle 2
Smile Arabic Dictionary for Kindle 2

Introduction:

I've been looking for an Arabic dictionary for Kindle 2 and unfortunately, I couldn't find one. I consider myself relatively good in English although it's not my native language, but still, I believe it's always better to learn new terms or words in your native language as this would be easier to remember or to help you connect these words with something recognizable.

Anyway, after I couldn't find a dictionary that will show the meanings of English words in Arabic, I thought I should try to create one myself. I have a good background in software programming, but I don't have any experience with Linux.

In this post, I'll provide a link to download the final dictionary result in addition to the steps I used to build the dictionary + changes I had to make to my Kindle.

I should mention at this point that the dictionary I've successfully created doesn't show Arabic letters in the correct order. You see, in Arabic language, there are 3 main differences than Latin languages:-
  1. Letters are Unicode (represented by 2 bytes instead of just 1).
  2. Arabic is a right-to-left language, not left-to-right.
  3. A letter can change its shape (glyph) according to its location in the word.

I've successfully created a dictionary that'll show the meaning in Arabic letters, but they're shown in "left-to-right" order and they're not connected.

So, you can say I have failed on points 2 and 3 (until the time of writing this post).

Before I go into the details of creating the dictionary, I think it's time to point out that the English2Arabic dictionary for Kindle2 is attached. Please use it at your own risk :-)


Implementation Details:

1. Creating dictionary.

To create the dictionary, I've used the information in this post and I used the Arabic dictionary here.

I used Mobipocket Creator to create the dictionary.

At this point, I created a dictionary that will show the meaning of a word when you scroll the cursor to. The problem, however, was in showing the Arabic letters. I could see empty squares instead of letters. This meant that the default fonts of the Kindle cannot show Arabic.

2. Changing Kindle font.

In order to show Arabic letters, you'll need to use a font that supports Unicode. Usually, a font like "Arial" or "Time New Roman" should work just fine, but I needed to use a hack to apply such fonts.

At first, I tried this hack, but unfortunately, it gave poor results. Either, the font didn't work for Arabic letters or the English text of the actual book looked poor and hard to read.

I was looking for a font that supports Arabic letters and at the same time looks good on the Kindle. I don't want to end-up supporting Arabic and unable to enjoy my English books.

After more research, I found this hack. This hack allowed me to choose a specific font (any font) to use on the Kindle which was awesome when compared to the previous one. So, I prepared a font set using a font called "Simplified Arabic Bold". This font is designed with Arabic language in mind as the name indicates.

I've installed that font on the Kindle and voila ... I’ve got a dictionary that shows Arabic letters.

What's next?

Hopefully, I'll keep on searching for a solution to force the Kindle to show the letters of the words meanings in the reverse order (RTL) and to find a solution to connect letters together. I'm not sure how hard that would be... hopefully some of you guy could share any ideas or thoughts about this.
Attached Files
File Type: zip eng2ara.zip (4.68 MB, 455 views)
Bassam Jarad is offline   Reply With Quote
Old 04-28-2012, 07:14 PM   #2
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,998
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Bassam Jarad View Post
I've installed that font on the Kindle and voila ... I’ve got a dictionary that shows Arabic letters.
Great job!

Quote:
Originally Posted by Bassam Jarad View Post
Hopefully, I'll keep on searching for a solution to force the Kindle to show the letters of the words meanings in the reverse order (RTL) and to find a solution to connect letters together. I'm not sure how hard that would be... hopefully some of you guy could share any ideas or thoughts about this.
Unfortunately, there's hardly any K3 development going on and I haven't heard of any active K2 projects.
IIRC, some K2 models can be hacked to use a special version of the K3 firmware, which might enable you to install Launchpad and fbKindle, which will allow you to read Arabic ePubs. Unfortunately, fbKindle doesn't have any dictionary support and none of the most experienced developers is interested in porting StarDict or another dictionary software to the Kindle platform.

As for your dictionary, I'd simply write a macro/script that looks for multi-word Arabic definitions and reverses the order. I.e., it'd re-write the words in LTR order.

You may also want to upload your dictionary to the MR Patricia Clark library (make sure to read the posting guidlines and select Reference as the prefix).
Doitsu is offline   Reply With Quote
Old 04-29-2012, 06:47 AM   #3
Bassam Jarad
Junior Member
Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.
 
Posts: 6
Karma: 286
Join Date: Apr 2012
Device: Kindle 2
Quote:
Originally Posted by Doitsu View Post
As for your dictionary, I'd simply write a macro/script that looks for multi-word Arabic definitions and reverses the order. I.e., it'd re-write the words in LTR order.
Thanks for the reply. I think this may work, but I'm not sure if it'll be simply a matter of just inverting the order of letters. I'll give it a try and see what happens.

About the other problem of changing the letters shapes according to their locations. Is there a way to let the Kindle show a specific glyph instead of providing it with a letter? I think if I could find a way to let the Kindle display a specific glyph instead of the letter, I'll then create the dictionary with the proper glyph codes instead of the letters and this would show correctly on the Kindle. I know, this would have the restriction of having to use a specific font only for the job based on the glyphs specified inside the dictionary, but it'll be better than my current result.
Bassam Jarad is offline   Reply With Quote
Old 04-29-2012, 10:10 AM   #4
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,998
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Bassam Jarad View Post
About the other problem of changing the letters shapes according to their locations. Is there a way to let the Kindle show a specific glyph instead of providing it with a letter?
Since the Simplified Arabic fonts support the Arabic Presentation Forms-B Unicode block (0xFE80-0xFEFC), you could theoretically encode the Arabic text using initial, medial, final and isolated letters.
However, then you'd also need to code your own contextual shaping algorithm that picks the correct letter forms depending on the position of the letter in the word.

For example you'd need to encode "غير مسؤول" as follows:
ﻝﻭﺆﺴﻣ ﺮﻴﻏ
(Lam-Waw-WawHamza-Seen-Meem Reh-Yeh-Ghain)

However, you'd get exactly the same result by simply rearranging the words. For example, if you compile the following test dictionary with Mobipocket Creator, it will display the two Arabic words in both entries in the correct order.

Code:
<html>
<body>

<idx:entry>
	<b><idx:orth>irresponsible</idx:orth></b><br/ > 
	&#xfedd;&#xfeed;&#xfe86;&#xfeb4;&#xfee3; &#xfeae;&#xfef4;&#xfecf;<br/ >
	(Unicode Arabic Presentation Forms-B)
</idx:entry>
<br/><br/>
<hr/>

<idx:entry>
	<b><idx:orth>inaccurate</idx:orth></b><br/ > 
	دقيق غير<br/ >
	(Unicode Arabic: regular characters, reversed word order)
</idx:entry>
<br/><br/>
<hr/>

</body>
</html>
Doitsu is offline   Reply With Quote
Old 05-02-2012, 04:53 AM   #5
Bassam Jarad
Junior Member
Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.
 
Posts: 6
Karma: 286
Join Date: Apr 2012
Device: Kindle 2
I've tried the method above and it worked ... so, it seems that in concept, I should be able to create text in Arabic and with connected letters. The problem now is in writing a script to do that automatically. I'll try to do it soon and keep you posted. Thanks for the info Doitsu.
Bassam Jarad is offline   Reply With Quote
Old 05-02-2012, 02:15 PM   #6
Kindl3
Junior Member
Kindl3 began at the beginning.
 
Kindl3's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2012
Device: kindle 3
As-salam 'alaykum (peace be with you) guys


First i want to thank Bassam for this awesome idea.

I downloaded the dictionary on my Kindle 3, but I only get square boxes. Even though kindle 3 can really view arabic text (even in Right to Left format).


So i was wondering, is this dictionary only limited to the kindle 2?

And also, is there a way of making it work as an Arabic to English dictionary?



I'm really excited for this project.. look forward to your responses
Kindl3 is offline   Reply With Quote
Old 05-02-2012, 06:03 PM   #7
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,998
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kindl3 View Post
I downloaded the dictionary on my Kindle 3, but I only get square boxes.
You need to install the font hack that Bassam mentioned.

Quote:
Originally Posted by Kindl3 View Post
Even though kindle 3 can really view arabic text (even in Right to Left format).
But only in the Internet Browser.

Quote:
Originally Posted by Kindl3 View Post
And also, is there a way of making it work as an Arabic to English dictionary?
You could theoretically reverse the dictionary, however, the Kindle 3 does not support dictionary lookup for non-Latin alphabet based languages.
I.e. you'd probably have to convert the Arabic lookup string to the Arabic Chat Alphabet or another transliteration system.
If you have a Windows system, you could download the old Mobipocket Reader, which offers dictionary lookup for Arabic and many other languages.

BTW, the quality of the entries in the free dictionary that Bassam used is very poor. For Arabic-English, I'd recommend converting the data file of the Buckwalter Morphological Analyzer, which contains definitions for about 30000 entries.
One such data file can be found here, unfortunately the Arabic text is encoded in the Buckwalter transliteration, which is a major PITA. For example, {iqotiSAdiy~ = اِقْتِصَادِيّ
Doitsu is offline   Reply With Quote
Old 05-03-2012, 06:39 PM   #8
Kindl3
Junior Member
Kindl3 began at the beginning.
 
Kindl3's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2012
Device: kindle 3
Quote:
Originally Posted by Doitsu View Post
You need to install the font hack that Bassam mentioned.
I'm a newbie with kindle hacks (the most i've been able to do is jailbreak it) so you'll have to bear with me.



Quote:
But only in the Internet Browser.
I can read pdfs in arabic, even if they're text based (not scanned images, but real arabic text [right to left in the entire book]).

If that's the case, do i still need to install the font hack on the kindle 3? If so, are there any links on what i need to do step by step?


Quote:
You could theoretically reverse the dictionary, however, the Kindle 3 does not support dictionary lookup for non-Latin alphabet based languages.
I.e. you'd probably have to convert the Arabic lookup string to the Arabic Chat Alphabet or another transliteration system.
Yeah i'll be willing to do the arabic chat alphabet transliteration, what procedure would i need to implement to make the kindle recognise the arabic transliteration into arabic?


Quote:
If you have a Windows system, you could download the old Mobipocket Reader, which offers dictionary lookup for Arabic and many other languages.
Looks interesting, is that a file made which is downloadable (from where?) and workable on kindle 3 if i transfer it to 'documents' folder? Just like the original dictionary file Bassam uploaded?


Quote:
BTW, the quality of the entries in the free dictionary that Bassam used is very poor. For Arabic-English, I'd recommend converting the data file of the Buckwalter Morphological Analyzer, which contains definitions for about 30000 entries.
One such data file can be found here
, unfortunately the Arabic text is encoded in the Buckwalter transliteration, which is a major PITA. For example, {iqotiSAdiy~ = اِقْتِصَادِيّ
I agree, that dictionary was too simple.

How can I convert the data you've given me to suitable kindle 3 format? Is there any basic step-by-step method for someone new in this field?



Many thanks in advance. Look forward to your reply.

Last edited by Kindl3; 05-03-2012 at 06:47 PM.
Kindl3 is offline   Reply With Quote
Old 05-04-2012, 02:16 AM   #9
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,998
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kindl3 View Post
I'm a newbie with kindle hacks (the most i've been able to do is jailbreak it) so you'll have to bear with me.
See Changing the reader font without a hack [K3/K4] for more information.

Quote:
Originally Posted by Kindl3 View Post
I can read pdfs in arabic [...] If that's the case, do i still need to install the font hack on the kindle 3?
Both the PDF viewer and the Internet Browser are separate software modules that natively support Arabic. However, the Kindle framework doesn't. If you changed the fonts, you'd be able to read Arabic .mobi files, but the word order would be reversed.
IMHO, it would be more useful to install Duokan Lite (not Duokan 2012) or fbKindle, which will allow you to read Arabic ePubs.

Quote:
Originally Posted by Kindl3 View Post
Yeah i'll be willing to do the arabic chat alphabet transliteration, what procedure would i need to implement to make the kindle recognise the arabic transliteration into arabic?
Unfortunately, you cannot make the Kindle recognize transliterated Arabic, but you could create a dictionary with transliterated Arabic headwords. E.g. you'd open your dictionary and enter mifta7 on the keyboard to search for مفتاح.

Quote:
Originally Posted by Kindl3 View Post
Looks interesting, is that a file made which is downloadable (from where?)
Mobipocket Reader is the Windows ebook reader program that the Kindle software is based on.

Quote:
Originally Posted by Kindl3 View Post
How can I convert the data you've given me to suitable kindle 3 format?
1. Get a decent editor with regular expression support.
2. Massage the file so that you end up with a tab-delimited file with the headword as the first entry and the definition as the second entry.
3. Follow these instructions to generate the dictionary.
Doitsu is offline   Reply With Quote
Old 05-04-2012, 12:28 PM   #10
Kindl3
Junior Member
Kindl3 began at the beginning.
 
Kindl3's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2012
Device: kindle 3
Thanks for the reply.


Okay now i'm not going to go too far ahead with that yet.

Duokan's been my priority for a long time, so since your experienced at that - I'd hope i can get some support from you on that.


I've got kindle 3.3, which makes it difficult to install Duokan. I tried your method which you linked to here last year;
http://www.mobileread.com/forums/sho...7&postcount=29

I downloaded the file, but it only works for kindle 3.2.1 firmware.


I've looked for alot of ways to install Duokan on kindle 3.3 and they all explain it in different ways, ore i always get an error that it's not installed. Alot of the methods include installing the older version first. But sadly i can't even get any results for any older version, let alone the later version.

So any easy support for Kindle 3.3 Duokan installation will be appreciated
. Especially since you're quite experienced at it
Kindl3 is offline   Reply With Quote
Old 05-04-2012, 05:44 PM   #11
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,998
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kindl3 View Post
I downloaded the file, but it only works for kindle 3.2.1 firmware
Don't let the folder name confuse you. Even though it says 3.2.1, it also works with Kindle 3.3. (The developers changed the folder name, in later versions.)

BTW, Duokan 2012 no longer supports Arabic.
Doitsu is offline   Reply With Quote
Old 05-05-2012, 07:17 AM   #12
Kindl3
Junior Member
Kindl3 began at the beginning.
 
Kindl3's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2012
Device: kindle 3
I tried the duokan install from the above link and got the common U004 error (not installed).

Any ideas why that might be?
Kindl3 is offline   Reply With Quote
Old 05-05-2012, 08:15 AM   #13
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,998
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kindl3 View Post
Any ideas why that might be?
No, but I remember that I had to uninstall the Jailbreak in order to install Duokan. If that doesn't work either, you could always install fbKindle, which supports Arabic with Matan's FBReader binary. (You'll also need to install Launchpad to start fbKindle.)
For more information on fbKindle see the fbKindle forum.
Doitsu is offline   Reply With Quote
Old 05-05-2012, 12:15 PM   #14
Bassam Jarad
Junior Member
Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.Bassam Jarad has a complete set of Star Wars action figures.
 
Posts: 6
Karma: 286
Join Date: Apr 2012
Device: Kindle 2
Based on the information that was provided by Doitsu (thanks man, I really appreciate the hints), I've successfully inverted the letters of the Arabic meanings for the Kindle dictionary.

Now, they show up correctly - right to left. Also, by using the method above, the letters are displayed connected too.

So, finally, I'm glad to say that we have English to Arabic dictionary for Kindle 2 that’s working and looking good.

The new Kindle 2 English to Arabic dictionary is attached.
Attached Files
File Type: zip Eng2Ara.zip (4.87 MB, 273 views)
Bassam Jarad is offline   Reply With Quote
Old 05-13-2012, 06:27 AM   #15
omanlrc
Junior Member
omanlrc began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2012
Device: kindle 3
السلام عليكم اخي
شيء رائع ان اجد اشخاص يعرفون لبرمجة الكندل
..

نزلت القاموس واشتغل
بس المشكلة لا تظهر الحروف العربية حاولت طرق عديدة وللاسف لم استطع تظهر لي فقط مربعات

هكرت الخطوط وحاولت احط الخطوط العربية ولا زالت نفس المشكلة..
عندي كيندل 3 3.3

بارك الله فيك هل ممحمن تحمل الخطوط التي استخدمتها؟؟

omanlrc is offline   Reply With Quote
Reply

Tags
arabic, dictionary, kindle 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Kindle fire and Arabic language Support NooN Kindle Fire 2 11-20-2012 01:42 PM
Dictionary question: changing word delimiters for french dictionary oecherprinte Amazon Kindle 1 05-09-2011 04:45 AM
Help Arabic support in kindle 3 Ritter95 Amazon Kindle 4 02-17-2011 10:07 PM
Content Kindle DX with converted Arabic PDF ? abdulsattar Amazon Kindle 21 12-23-2010 09:12 AM
Oxford built-in dictionary disappears after changing default dictionary YYZscientist Amazon Kindle 4 01-24-2010 08:42 PM


All times are GMT -4. The time now is 01:51 AM.


MobileRead.com is a privately owned, operated and funded community.