Alternative dictionaries

Search This thread

Delunte

New member
Jun 5, 2012
2
0
German - English

Hi Renate, I am very interested in a German - English dictionary. So if you could post that, I would be very appreciative! Thanks!
 

Renate

Recognized Contributor / Inactive Recognized Dev
German-English dictionary:

Unzip the file deu-eng.db, push to /system/media/reference/basewords.db

Unzip the file null.db, push to /system/media/reference/inflectedwords.db

(Save the original files if you want to go back to them.)
 

Attachments

  • deu-eng.zip
    4.8 MB · Views: 91
  • null.zip
    550 bytes · Views: 90

yov9

Member
May 1, 2012
10
0
any chance posting an english-hebrew one?

will make my life really easier..
thanks
 

Piouche

New member
Jun 5, 2012
1
0
Hi

Renate, can you use these files to create a nook dictionary?
rapidgator.net/file/15601278/Dict.rar.html
It's a english-> french stardict format dictionary, bigger than the free-dict one, and with a syn file that have inflected words.
 

ApokrifX

Senior Member
May 23, 2011
468
50
Sorry, I must have missed that, ApokrifX.
The stock Reader.apk has both the dictionary provider and a dictionary client in it.
There's a lot of things that could be done with this.
I'm not sure which way you want to go with this.

You could switch the stock Reader to use an entirely different dictionary provider
or switch another reader to use the stock Reader dictionary.
The English dictionary that comes with the Reader is actually not bad, although the formatting was munched during the export.

Maybe I will write a little app to just lookup the dictionary using typed-in words.
I guess, it’s gotta be some (standard?) API to call already installed dictionary.
Since, I have no idea if it’s true or not, the next best thing to have an adapter to forward calls from stock Reader to Dictionary browsers with known activation interface.
I think, they all should be pretty similar (start activity/lookup word)
CoolReader is open source and it works with market dictionary browsers. I guess, not a big deal to check how it’s done.
However to tap into stock Reader and intercept/forward calls to another dictionary provider – looks you are the only person "who knows how". ;)

Renate,
I saw, you started fiddling with injecting smali code, so I was wondering…
How difficult it’ll be to replace native reader dictionary browser, with a market one (ColorDict, Fora Dictionary, you name it)
I guess, it’s gotta be some (standard?) API to call already installed dictionary.
I can post some other “I guess” things, but I think you know all those things better than me anyway. :eek:
 
  • Like
Reactions: xor_

Renate

Recognized Contributor / Inactive Recognized Dev
In the sea of the internet it's hard to tell which files are really publicly free.
That's way I chose freedict.org, because it appears legit.

Many people have mentioned dictionary apps, but that's just what they are, apps.
The dictionary databases come from scrounged sources, including StarDict which was removed for copyright violation.

In any case, my current conversion software uses the TEI-XML format used in freedict.org
I would have to write some more code to be able to handle something else.

All the details of how the stock Nook dictionary works are in this thread.

I do like a good dictionary and have thought about buying a commercial dictionary and integrating it into my Nook.
Still, most of them probably do their own DRM and it would not be easy.
Also this would be for my own use anyway.

I've not tried any of the other readers, the stock Nook Reader works well enough.
 

ApokrifX

Senior Member
May 23, 2011
468
50
The dictionary databases come from scrounged sources, including StarDict which was removed for copyright violation.
I didn’t know about last part.

In any case, my current conversion software uses the TEI-XML format used in freedict.org
I would have to write some more code to be able to handle something else.
All the details of how the stock Nook dictionary works are in this thread.
I know. I wrote same thing too.

I do like a good dictionary and have thought about buying a commercial dictionary and integrating it into my Nook.
Still, most of them probably do their own DRM and it would not be easy.
Also this would be for my own use anyway.
Understood.

I've not tried any of the other readers, the stock Nook Reader works well enough.
Stock Nook Reader is good, but stock Dictionary is not (IMO)
It cannot follow hyperlinks, it cannot browse dictionary words, etc. etc. etc.
You name it.
I do understand why B&N didn’t do it better and never would most likely.

If you are quite happy with stock dictionary...well I guess, there is no incentive for you to change anything.
I really don’t know how difficult is to write an adapter to call external dictionary instead of built in.
If I can do it myself, I would.

BTW: Oxford Dictionary is not free for android, but Merriam-Webster's Collegiate Dictionary is. As well as few others ;)
 

Renate

Recognized Contributor / Inactive Recognized Dev
There are three things clearly bad with the stock dictionary:
The formatting on export got munched, both whitespace and accented chars.
You can't browse.
The intended hyperlinks between words doesn't work.

I am planning to work on all three of these,
I just wasn't clear how switching to another reader would solve any of this.

Step 1: Write a standalone dictionary browser.
Step 2: Write a program to reprocess the stock dictionary.
Step 3: Write a patch to invoke the standalone dictionary browser from reader.
 

Renate

Recognized Contributor / Inactive Recognized Dev
I attacked the laundry list in the previous post.

The dictionary provider built into the Reader app is actually unsuitable for browsing.
Half of the code is there, but they abandoned it.
There's not much point in using that.

I wrote a dictionary provider and client app. It browses fine.
The English dictionary that comes with the Nook has a bunch of ugly formatting that needs to get fixed.
Right now the app is in a primitive state, but it works.
I have to add in a switch to select different language dictionaries.

The other part was hacking the stock Reader app to use my dictionary app.
I ran into problems getting the modified Reader.apk signed and working on a shared id.
It works right now without a shared id.

I don't know whether this would affect people who have bought books at B&N.
It works fine with the books that I borrow from my library on OverDrive.
 

ApokrifX

Senior Member
May 23, 2011
468
50
The other part was hacking the stock Reader app to use my dictionary app.
I ran into problems getting the modified Reader.apk signed and working on a shared id.
It works right now without a shared id.
Renate,
What exactly you having troubles with?

I think I’ve asked you very same question few months early.
It was about app signing and shared ID.
Cannot find you response anymore (cannot come up with good search string)
My understanding is:
For Shared ID to work between apps, they all need to be signed with same key.
I.e. we need either to re-sign all apps, which used same ID (Library, Home, etc)
Or use sign with android system key and put app into system folder (and use root ID?)

AFAIR, you write early (in the response I cannot find), shared ID/sign key is checked during app install only.
If you replace apk for already installed app, nothing will be checked.
Did I get it right? :confused:
Again, what exactly doesn’t work?

If I have a right to vote, I’ll cast mine for #3:
Write a patch to invoke the standalone dictionary browser from reader.
I wish I can help somehow...
 

Renate

Recognized Contributor / Inactive Recognized Dev
Yes, the bit with signing is more complicated than I thought.

For instance:
Take framework-res.apk, modify half the graphics, leave the original META_INF in, put it back in, no problem.
Take framework-res.apk, modify anything on AndroidManifest.xml, leave the original META_INF in, put it back in, you will brick the Nook.

I have had problems even copying the (unmodified) stock Reader.apk over itself.
You get an error about not being able to share IDs.

To get my work in progress going, I deleted the bit about shared IDs, signed it with the androiddebugkey and copied it over to /system/app.

In other news, I redid the whole dictionary app concept.
Now if you get a direct hit, you see the definition detail.
If you don't, you see an entry browser with before and after entries and "your word would be here" kind of thing.
 

ApokrifX

Senior Member
May 23, 2011
468
50
Yes, the bit with signing is more complicated than I thought.
For instance:
Take framework-res.apk, modify half the graphics, leave the original META_INF in, put it back in, no problem.
Take framework-res.apk, modify anything on AndroidManifest.xml, leave the original META_INF in, put it back in, you will brick the Nook.
Ooook…
But you should be able to fix it over abd still, right?
Smth, like:
Adb shell
Stop
Restore old version of framework-res.apk
Start
(Stop/Start without parameters Stop/Start whole framework)

I have had problems even copying the (unmodified) stock Reader.apk over itself.
You get an error about not being able to share IDs.
I see.
That’s how I would expect it to work, actually…
From your experience, looks like graphics files are not included in signing process and can be replaced easily, correct?

To get my work in progress going, I deleted the bit about shared IDs, signed it with the androiddebugkey and copied it over to /system/app.
I’m curious do you run it as root ID or some other one?

In other news, I redid the whole dictionary app concept.
Now if you get a direct hit, you see the definition detail.
If you don't, you see an entry browser with before and after entries and "your word would be here" kind of thing.
Cool. The list it shows – is it inflected one (i.e. all word forms/synonyms) or small one?
 

Renate

Recognized Contributor / Inactive Recognized Dev
Ooook…
But you should be able to fix it over abd still, right?
Smth, like:
Adb shell
Stop
Restore old version of framework-res.apk
Start
(Stop/Start without parameters Stop/Start whole framework)

You know, when it got into a boot loop I didn't even check if ADB was working.

From your experience, looks like graphics files are not included in signing process and can be replaced easily, correct?
Graphic files, resources.arsc. classes.dex, AndroidManifest.xml are all signed.
You can verify this easily with the jarsigner tool.
I've modified 3 of these without problems.
AndroidManifest.xml seems to be only one actively checked.

I’m curious do you run it as root ID or some other one?
I run it as app_30 (apparently). It's just a normal app.

Cool. The list it shows – is it inflected one (i.e. all word forms/synonyms) or small one?
The stock English dictionary has a main headword database, an inflected to baseword database and a biographical/geographical database.
All the databases in freedict.org just put all the inflections that they can be bothered to enter directly in the one database.
So the database will have entries for "ran" and "run" that are a bit duplicated.

Even with no inflections, it's not that bad if when the lookup misses it shows you a list where you can simply select the variant.
 

ApokrifX

Senior Member
May 23, 2011
468
50
You know, when it got into a boot loop I didn't even check if ADB was working.
Adb has no dependency on framework (framework-res.apk)
So you can replace safely pretty much anything framework related without risking to brick it.

I thought, you did smth. like:
Replace framework-res.apk
Stop
Start
Framework cannot start – tons of errors in logcat…
Restore old version of framework-res.apk
Stop
Start

Well, I guess, you just restarted whole thing instead. :(

Graphic files, resources.arsc. classes.dex, AndroidManifest.xml are all signed.
You can verify this easily with the jarsigner tool.
I've modified 3 of these without problems.
AndroidManifest.xml seems to be only one actively checked.
Very interesting…
Did you figure out, what change in AndroidManifest.xml broke framework?

I run it as app_30 (apparently). It's just a normal app.
But the rest of the pack run as sharedUserId="android.media"
Technically, app_30 cannot share access with access android.media.
I’ve read somewhere, for app deployed in System folder quite few restrictions are lifted.

The stock English dictionary has a main headword database, an inflected to baseword database and a biographical/geographical database.
All the databases in freedict.org just put all the inflections that they can be bothered to enter directly in the one database.
So the database will have entries for "ran" and "run" that are a bit duplicated.

Even with no inflections, it's not that bad if when the lookup misses it shows you a list where you can simply select the variant.
I got it.
 

Renate

Recognized Contributor / Inactive Recognized Dev
Well, I guess, you just restarted whole thing instead. :(
Not really, it was cycling through the dots and the screen was flashing.
Probably the WiFi wasn't even working yet.

Did you figure out, what change in AndroidManifest.xml broke framework?
Anything at all, changing one byte.

But the rest of the pack run as sharedUserId="android.media"
Technically, app_30 cannot share access with access android.media.
Without shared app id there is no sharing. There is no feature I need that relies on sharing. I'm not even sure why it's necessary. I think that it's more just consolidation. I don't have home or shop or use in-store browsing. You do know that the stock Reader writes your LRP (last reading point) to the "cloud" (wherever or whoever that is). I don't see any reason why B&N should track my reading.
 

ApokrifX

Senior Member
May 23, 2011
468
50
Not really, it was cycling through the dots and the screen was flashing.
Probably the WiFi wasn't even working yet.
I keep my WiFi off to save battery.
Don’t know if NST is rebooted and WiFi was on just before reboot, will it turn it on after reboot?
I guess, there gotta be a setting last WiFi state or WiFi autostart?
I mean WiFi is independent from framework-res.apk, but the interface to start it is.
BTW: To be on the safe side, you can run 2 ADBD – once listening on IP (WiFi) and another on USB.


Without shared app id there is no sharing. There is no feature I need that relies on sharing. I'm not even sure why it's necessary. I think that it's more just consolidation. I don't have home or shop or use in-store browsing. You do know that the stock Reader writes your LRP (last reading point) to the "cloud" (wherever or whoever that is). I don't see any reason why B&N should track my reading.
I guess, it’s for LRP syncing if you have more than one nooks registered under same account ;)
 

speedman2202

Senior Member
May 16, 2012
358
41
Cairo
anybody can replay me request about need English Arabic dictionary also anybody into text to speech staff cuz it will help me in translation and speak the language for English


anyway i see u all guys do great efforts , hope i can present any help


best regards ::)
 

Renate

Recognized Contributor / Inactive Recognized Dev
@speedman2202: I already posted an English-Arabic dictionary here:
http://xdaforums.com/showpost.php?p=26774522&postcount=34

I've got a prototype dictionary app working on my Nook that integrates with the stock Reader.
It supports the stock English dictionary and a German-English dictionary, hot switchable during use.

I'm backing away from compatibility with the stock dictionary, it's kind of a dead end.

For instance, by making the German-English dictionary in a more useful format it has shrunk from 16 Megs to 6 Megs.

I'm looking now to see if I will use my own format for dictionaries or something more common.

As the actual content (when it's cleaned up) of the stock English dictionary is pretty good, I will write something to convert it to the new format.

I've had Text-to-Speech working for test strings. It's another thing on my list.
 
  • Like
Reactions: speedman2202

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    hey @nmyshkin ... i thought you had deleted and exited out of xda ... surprised & glad to find you back active !!!

    any new tweaks and modd for our device ?

    :)
    Not to hijack this thread, but as Mark Twain is reported to have said, "Reports of my death have been greatly exaggerated." I have however been dealing with some serious health issues, the pain meds for which don't improve my concentration or analytical abilities. I'm slowly dropping down on the pain meds but as for the rest, we'll have to see how I respond to the rest of the therapy.

    I have been doing some work--you've probably already seen it--a new version of the Nook Settings app, and a true weather widget. Actually, I am sort of running out of ideas. I do these things for my own enjoyment of my device and then share on the off chance that someone else may find them useful. I now have a Glowlight which is completetly B&N free (see post) and someone has gotten me vaguely interested in a library app that would show covers (and I'd like access to the summary meta data such as you can see in Calibre). I think I understand how to handle epubs, but mobi files are heavily encrypted and extracting even a cover image is seemingly impossible. PDFs are just as bad. So this one is going to require a lot more thought.

    But I'm not dead yet.
    2
    Oh, great, there is some interest!

    I haven't posted the converter or any of the databases yet. As a newbie here I wasn't sure about posting links or 15 Meg attachments.

    The dictionaries from freedict.org are pretty basic word translations. There are some multi-word phrases, but of course the lookup on the Nook only works on single words.

    The original dictionary also has a database of inflected words, so that a lookup of "cows" will go to the headword "cow". I know of no source for inflected words in other languages.

    For an English/French dictionary you could keep the original English inflected word database and replace the headword database with an English/French database.

    I also want to make a companion EPUB book dictionary so that you could search (if necessary) arbitrarily for words.
    2
    Hi,

    I have just managed to convert some free Babylon dictionaries (.bgl) to Renate's dictionary format. It uses the stardict dictionary format (see http://code.google.com/p/stardict-3/) as an intermediate format. Moreover, one of the scripts converts from the stardict format to Renate's, so this method could be used also for another formats (not only .bgl) as long as 1) there is one tool to convert from that particular format to stardict's and 2) the entries are formatted in simple HTML (which is the case of the babylon dictionaries that I have tested).

    The instructions are included in the attachment. It first uses the PyGlossary project (see https://github.com/ilius/pyglossary) to convert from Babylon format to stardict format. Then I have slightly modified the PyStarDict project (see http://sourceforge.net/projects/pystardict/files/pystardict/v0.6/) and created one script in order to generate the database file according to Renate's format. So all the credits to the authors of these open-source projects and to Renate.

    I do not support piracy, so please do use this script only with Babylon free dictionaries or if you have the rights to use it with other Babylon dictionaries.

    ---

    EDIT: file updated so now it takes the parameters from the command line (the source code has not to be changed).
    2
    Sorry, Nook reader versions are very incompatible.
    I hadn't looked into this recently, the patches for Lookup only work on 1.2.1
    (The latest Nook, the white Glow 2 is also a big mix of old and new.)

    I think that I'd update to 1.2.1
    That's probably the last update we'll ever see.

    sqlite3 for the Nook is below (it's a very thin program).
    Make system read/write:
    Code:
    mount -o rw,remount /dev/block/mmcblk0p5 /system
    adb push it over to /system/bin, then:
    Code:
    chmod 755 /system/bin/sqlite3