|
|
View Full Version : Dictionary for Sony PRS500/5 (autorun from SD card)
Clemenseken 03-27-2008, 04:48 PM Hi!
Like llasram, I've been busy with obelix' autorun solution:
Here is the second edition of DictioLauncher 0.7b.
*** There is a NEWLY altered versions "...7b" by =X= that's fit for larger dictionary files (=> quicker search!!!) on page 4, post #59, of this thread.
AND: there is an even NEWER version by lisak, posted on page 5 /#64, link at bottom here, that has completely rewritten code; I assume improved one (w/o having looked at it...) ;) ***
These are the new 0.7b features:
– Found explanations for your search word are now separated correctly.
– The "Choose Dictionary" button lets you change the dictionary from the UI (your choice is saved in "dict.dat").
– Expressions that consist of several words (e.g. "New York") are displayed now completely in the "first" line; "space" can be input from keyboard.
ATTENTION: This means that in your dictionary the search word HAS to have TWO SPACES before the explanation !!! Otherwise NO WORD will be found ...
Here are the features from 0.5:
– Dictionaries can be accessed without closing your current book: by inserting the SD card the launcher just "appears" and will "disappear" after use.
– Your dictionary must be a simple ".txt" file !!!
– You can search for any word using the onscreen keyboard (use buttons 0 to 9).
– Get at different keyboard rows with "cursor-up/down" ("left/right" for model 505).
. .(It's enough to type the first letters of a word: the whole word will be displayed...)
– The "arrow" key removes letters from your input word one-by-one.
– Translation/search starts by pressing "ENTER" – To quit application press "MENU" or pull SD card out.
– The previous/next line (= word) will be displayed by pressing <page up/down> or <cursor left/right> (again: <up/down> for model 505).
DictioLauncher will check your input word against the first word of each line of your text file.
Search time varies from zero ("a...") to "quite some time" (> 3 s for "z..." in a 12,000-lines-file).
=================================================
– Included are three example dictionary files (French, Italian, Spanish; from www.freedict.com). Version 0.5 needs to have the dictionary file renamed to "dictionary.txt" and put into "software".
(Actually I found those files from freedict.com at http://www.wordgumbo.com/index.htm which has a MUCH broader assortment...)
– BUT - you may use *ANY* text file you have/find (thesaurus, to-do-list, etc.)
– Go and find dictionary files for any language you need.
– Your text file should be saved as UTF-8. Sony PRS-500/5 seems to get a "hangover" if confronted with characters like á, è, ß or even ö (o-umlaut)...
(Also the eReader does *not* like "-, *, /" at the beginning of a line while searching your input .)
=================================================
To install, extract the zip file and put "Sony Reader" onto your SD card (root); if you use version 0.5 place one of the dictionaries into "software" and rename it to "dictionary.txt".
The second attachment ("...505_SP1.zip") is especially and only for models prs-505. Its bigger size is due to an alternative keyboard layout (both are "landscape", the alternative one has letters rotated 90°; the application's windows are portrait, though...).
The third attachment is ONLY for models 500 !!!
... the fourth one ONLY for 505'ers ...
... just like the NEW fifth attachment:
an "add-on" feature for models prs505: it's another alternative keyboard layout (suggested by spooky69).
With this one letters are organized in an A-Z order (abc/def/ghi/...) which may suit 505-owners better, I assume. It wasn't too much work, so I just post it here as a "Service Pack 1" for 505ers!
But be aware that this totally different layout needs an (only marginally) changed "autorun.js" file (included); whenever you decide to swap layouts (back) you'll have to swap "autoruns", too...
*** ATTENTION ***
On page 4, post #59, of this thread is a NEWLY altered version for quicker search time/larger files by =X=.
ONE MORE improved version has arrived: lisak rewrote my "old" code - see #64 on p.5 or just below.
Link to lisak's version "DictioLauncher.07_LisakMod.zip" (http://www.mobileread.com/forums/attachment.php?attachmentid=13182&d=1212445222)
JSWolf 03-27-2008, 08:40 PM Well done! I might have to give this a go.
I've stuck the thread to make it easier to find.
I'll try this!
Thank you very much!
dynabook 03-28-2008, 08:32 AM Why can't Sony have a line of accessories like this for sale?
Clemenseken 03-28-2008, 09:44 AM I apologize to any hopeful prs-505 users who downloaded my first version of the "DictioLauncher".
I feel ashamed I didn't realize sooner that their button layout *IS* different from model 500 (though I read a lot about it...).
So I hurried to make a version for all "505ers": See second attachment to my first posting!
Sorry – and have fun!
:) :) :) :) :) :) :)
@ JSWolf: I'm really proud to get a "sticky award" at MobileRead.com!
I was a little overwhelmed by all the posting / finding out about wrong button layout for 505ers / repairing faults / answering feedback etc...
adr2689 03-28-2008, 09:43 PM This seems like an excellent addition to the device, but I'm on a 505 and am a little confused by something: each column of the keyboard is selected by right/left arrows, but the numbers seem to be inversely related to the input letter (eg, number 2 => "s", number 9 => "l"). Not sure whether this would require anything more than a change to the skin, but this obviously would affect the intuitive qwerty layout.
It would be quite nice, on that front, for the text to be rotated with the keyboard when reading in landscape mode.
One other thing that struck me is the truncation of definitions. I'm currently playing with the French dictionary included in the zip, and, for example, the definition of "abaisser" finishes at the word "abate," missing the final three definitions (although the word following "abate," "abridge," exceeds the prescribed area and overlaps the keyboard). A larger text area might be useful in this regard. And (a minor aesthetic point) the title overlaps the icon in the top right hand corner.
Other than that, this seems like an ingenious way of getting around the lack of a keyboard, and supplies a sorely-needed tool for the unit. :thanks:
EDIT: one other query: any support for multiple word definitions - ie, is it possible to demarcate the word from the definition by something other than the first space? Eg, La Manche (the English Channel), La Haye (the Hague) &c.
EDIT EDIT: any way to avoid the splitting up of words? - as in the definition of "abandon" (plucked at random - though, in this dictionary, seems to be a singularly unuseful definition :)) which appears:
" abandonment 2. abandonme
nt 3. abandonment 4. aban
donment 5. isolation, sep
aration 6. acquiescence,
rezignation 7. cession relinqui|sh"
(| denotes right hand border of text box - last two letters of "relinquish" exceed this)
Clemenseken 03-29-2008, 04:19 AM ... and am a little confused by something: each column of the keyboard is selected by right/left arrows, but the numbers seem to be inversely related to the input letter (eg, number 2 => "s", number 9 => "l"). [...]
Sorry. You are SOOOOOOOOO right!!!
I developed "DictioLauncher" on my prs500 - and realized too late that prs505s are oriented completely different in regards to button layout...
I changed that and attached a "ServicePack1_505.zip" for all those who already tried my application: just replace the "old" autorun.js with the one in the Service Pack...
(...and I replaced the second attachment by one with the correct button access.)
It would be quite nice, on that front, for the text to be rotated with the keyboard when reading in landscape mode.
You are right again; but I will get to that later when I repaired some of the more urgent faults...
One other thing that struck me is the truncation of definitions ... definition of "abaisser" finishes at the word "abate," missing the final three definitions (although the word following "abate," "abridge," exceeds the prescribed area and overlaps the keyboard) [...]
I hope to have repaired that in the current Service Pack;
Other than that, this seems like an ingenious way of getting around the lack of a keyboard, and supplies a sorely-needed tool for the unit. :thanks:
Thanks for your feedback!
I'm just glad most of your findings came to my mind when I lay in bed, this morning - and I didn't learn of them only from your post ... Pooooooooh!
EDIT: one other query: any support for multiple word definitions - [...] La Manche (the English Channel), La Haye (the Hague) &c.
EDIT EDIT: any way to avoid the splitting up of words? - as in the definition of "abandon" (plucked at random - though, in this dictionary, seems to be a singularly unuseful definition :)) which appears:
" abandonment 2. abandonme
nt 3. abandonment 4. aban
Yes. These are some items that I plan to get into a version 0.6 or 0.7 later on.
I was happy to have the little baby running (crawling, that is) in the first place.
Any requests/queries are welcome!!!
This is a very nice application! Kodos to you! I find myself using this dictionary on oncation.
I really like your keyboard solution how cleaver was that!
The only limitation that is that the user is required to re-insert the memorystick. If these devices weren't so fragile I would not be such a drawback.
Feedback.
Dictionaries: It would be great! if the dictionaries could be changed from the UI and not by renaming the file.
Clemenseken 04-09-2008, 02:48 AM The only limitation that is that the user is required to re-insert the memorystick [...].
It would be great! if the dictionaries could be changed from the UI and not by renaming the file.
Thanks for your feedback!
I didn't have the idea to change dictionaries, yet, as I mainly use only just one. Good idea!
lutzik 04-09-2008, 03:59 AM Where would i go if i want to have another dictionary, for instance, russian? Is there a place where i can find .txt dictiories?
Thanks
This is my first post and I'm writing it to say you a biiiig thanks.
That's a wonderful and to me very useful app.
It would be even more great if it was possible to start it from the internal memory.
P.S.
the link freedict.com in your first post doesn't work
thank you again.
Clemenseken 04-09-2008, 01:09 PM Where would i go if i want to have another dictionary, for instance, russian?
Hi!
The place where I got my dictionaries is: http://www.wordgumbo.com
They have one Russian>English / English>Russian dictionary each, there.
But remember: you need a txt-file. If it's html you must at least change the extension to "txt"; then you'd have to eliminate any leading tags (e.g. <b> or <l>) at line beginnings: which any text editor will do by "find>replace" easily.
But I am no search guru ;) : there must be dozens of places to go, I assume...
P.S. the link freedict.com in your first post doesn't work
Sorry for that: the last bracket in my sentence got into the url. :smack:
Thanks again for your feedback: I would NEVER have learned of this typo without you!
I'm still researching the internal memory issue; I am not a "pro" programmer so I depend much on hints from the "local" gurus here.
Thanks very much to kovidgoyal, igorsk, obelix and others, BTW !!! :thanks:
Clemenseken 04-09-2008, 01:19 PM This is my first post and I'm writing it to say you a biiiig thanks. That's a wonderful and to me very useful app.
It would be even more great if it was possible to start it from the internal memory.[...]
Hi, olis!
I just saw that you are from Italy:
Buona sera e salve da Germania!
I am German and don't speak Italian fluently at all (but spent most of my childhood holidays in Italy. Mostly near Roma or Verona/Padova ...)
I actually developed this app because I needed a dictionary for ITALIAN that I'd like to read much more in!!!
(So I feel especially flattered to get such a positive feedback from you.)
Can you tell me if there is any kind of "community" for ereading devices in Italy? Any forums or the like? (Where did you learn of eReaders?)
@ Clemenseken.
I'm glad to hear you like Italy.:2thumbsup
There are no Italian forums on ebook reading devices that I'm aware of. I stumbled upon e-ink reading through English gadgets blogs. If you are interested in Italian ebooks I'd like to recommend these two sites:
http://www.liberliber.it/biblioteca/index.htm
http://www.letturelibere.net/libri-gratis.php
They are plenty of ebooks, all legally downloadable.
ciao,olis
Clemenseken 04-12-2008, 03:06 PM Hi!
Just wanted to announce that there will be a version 0.7 on monday/tuesday next week (14/15th of april, 08) with the above mentioned improvements...
(Features are working well, but need some exception testing and porting to the 505'ers.)
Clemens
Alexander Turcic 04-12-2008, 03:17 PM Excellent, Clemens! Looking forward to try it out. ;)
davidw89 04-14-2008, 06:37 AM Would a 2GB SD card be enough?
You mentioned that your dictionary needs to be a txt file..could someone share their dictionary then (an open source one maybe)?
Oh and how do i install this? Just dump it into my SD card?
Clemenseken 04-15-2008, 06:14 AM Would a 2GB SD card be enough?
more than enough: I am doing the developping on a 16MB card...
You mentioned that your dictionary needs to be a txt file. could someone share their dictionary then (an open source one maybe)?
There are three example dictionaries included in the zip-file plus two links to freedict sites...
Oh and how do i install this? Just dump it into my SD card?
as described in the first post: just copy the unzipped folder "Sony Reader" onto your SD card. When you insert that the autorun function will start automatically.
Clemenseken 04-15-2008, 06:18 AM :thumbsup: I will post the new version of DictioLauncher (0.7b) in a few minutes in post #1 of this thread. :)
Clemenseken 04-15-2008, 03:50 PM (Re: see Title)
davidw89 04-15-2008, 11:01 PM I am going to buy a SD card just for you :)..I'll let you know how it goes this week.
tamwub 04-16-2008, 05:54 AM I'm considering to buy some eInk device with dictionary support.
Could anybody provide me more info about how this Dictionary app is working for Sony 505?
Is it possible to translate some word in text already opened on screen now by selecting this word? Like it is done on cyBook.
Or it just need user to start Dict application, enter word to translate manually by typing it somehow and get translation?
Clemenseken 04-16-2008, 02:25 PM Is it possible to translate some word in text already opened on screen now by selecting this word? Like it is done on cyBook.
Or it just need user to start Dict application, enter word to translate manually by typing it somehow and get translation?
The answer is rather your second idea: You have to type at least the beginning of a word on an onscreen keyboard (as far as it makes it unique: "antic" will get you anticipate; one "scroll" down anticipation...)
(But don't you have to do some joystick movements on a cyBook, too?)
The program starts automatically the moment you insert the SD card – which is the main drawback so far (in version 0.7b you must do this for every new search). I don't know if that can be worked around (>internal memory) later on, yet.
I wrote "DictioLauncher" and am working on improvements, though. (My application is no commercial project. At least so far.) And you have to look for dictionaries yourself; three freedict ones are included as examples.
;) Obviously I am not an objective judge for "DictioLauncher's" qualities...
lisak 04-17-2008, 11:31 AM Impressive work, Clemenseken. I have a question, however: would there be a possibility to change the dictionary file format from txt to something more effective from the point of searching (flat file db or something like that)? I put together a thesaurus for english, which has approx. 14MB (large, I know...) and it works very fine when I search for word from the beginning of the alphabet. But if I look for something starting with 'z', it tooks approx. 2-3 minutes to get there...
Maybe it would be benefitial to implement at least some kind of heuristic based on the fact that the dictionary file is ordered alphabeticaly (which is, I think, a reasonable prerequisition which can be fulfilled very simply by sort-ing the file before uploading) and based on that perform an interval-based split search. I don't know the inner workings of your program, but maybe there is a way how to speed-up the search...?
Clemenseken 04-17-2008, 01:14 PM ... would there be a possibility to change the dictionary file format ... to something more effective ... flat file db or something...?
I put together a thesaurus for english ... 14MB ... starting with 'z' it took approx. 2-3 minutes to get there...
There is certainly a way to speed up search in such large files (again: I had not thought of such requirements... Thanx for your feedback!). I'll look into this ...
As to formats like "db" I must say that I'm only a free-time programmer.
If someone "in the know" reads this request and gives me a hint (or even some small example code...) as to how to access "db" files I'd be willing to give it a try!
lisak 04-17-2008, 05:59 PM The one I used to in my previous project to some extent was BerkeleyDB (http://en.wikipedia.org/wiki/Berkeley_DB), but again - I still haven't looked properly at the work of igorsk & others so I don't know the platform limitations and BerkeleyDB might be a little overkill here.
SQLite is another option which is quite widely used in embedded systems (think iPod/iPhone), but I don't have any personal experience with that.
Anyway, thanks for the reply and consideration of the suggestion!
Clemenseken 04-20-2008, 02:24 PM Hi!
...while I did not yet have time to look into SQLite (and/or its complexity) I'd like to mention that I found a solution for model 505's landscape keyboard – theoretically...
I noticed that the "landscape mode" of the PRSs will work automatically also with autorun-apps (like Sudoku and DictioLauncher; holding the "size" button does it even here!) and needs not to be invoked by some clever source code.
BUT:
all cutouts in the XML file have to be adapted to that behaviour. That seems to be feasible but difficile. I'll see to that this coming week ( => version 0.8 ?!)...
Clemens
spooky69 04-26-2008, 08:13 AM Forgive me if this is a silly question, but I've been looking pretty hard for an simple English dictionary to use and can't seem to find one that would work with this. Most of what I'm finding is simply word lists, which doesn't provide any usefulness for actually defining English words, which would easily be the most desired feature for me. Once again, sorry if I'm missing something obvious, but if somebody could post a compatible dictionary file that would serve as a straightforward English dictionary then I'd be very grateful.
Anyway, I really do like this a lot, from what I've seen. I just got an SD card recently and I'm really glad that I can use it for this purpose. The keyboard is brilliant, though if I remember correctly isn't it set up in a qwerty configuration? It seems like we should have the option to have the letters listed from A-Z instead of resembling a regular keyboard, especially since 505 readers are using the keyboard at a 90 degree angle. I realize that you already have the two versions with the letters at different rotations, but I really wouldn't mind a third version that has the letters in the order of the English alphabet going downward in columns (or possibly in rows, depending on what works better). Better yet, if you could create an editable text file with configuration options or simple control program that would allow users to tweak the keyboard layout themselves (including columns-vs.-rows for an A-Z format) then you'd only have to give people one version of that program for the 505.
I really do appreciate the work you've put into this and it seems like the perfect solution to the dictionary issue. Thanks again!
Clemenseken 04-26-2008, 03:03 PM [...]The keyboard ..., though if I remember correctly isn't it set up in a qwerty configuration? It seems like we should have the option to have the letters listed from A-Z instead of resembling a regular keyboard, especially since 505 readers are using the keyboard at a 90 degree angle. I realize that you already have the two versions with the letters at different rotations [...]
Well, a third keyboard layout certainly is doable. (I'd just have to edit a Photoshop file and push around some letters.) I'll note that idea for a version 0.8/9!
Better yet, if you could create an editable text file with configuration options or simple control program that would allow users to tweak the keyboard layout themselves [...]
This one is more complicated. The screen graphics are prepared as PNG files from which "cutouts" are set in an XML file. In theory all letters from the keyboard could be defined as "skin ids"; which would mean at least 10 rows which would have to be requested from the user then inserted into program source code...
I'm afraid that would lead to much confusion for users (and maybe me while developping it?). But I will keep the idea in my mind.
I really do appreciate the work you've put into this and it seems like the perfect solution to the dictionary issue. Thanks again!
I am glad you like the work so far - and told me so ;)
As to your first question about English dictionaries I think this may not be the right thread.
I am German and use my DictioLauncher mainly for reading Italian and now and then for English words. But I just need a translation...
When you use "Advanced Search" on this site and look for "dictinary" ONLY in title and "Search Forums" "Sony Portable Reader" you'll get some threads (apart from "mine") that discuss this topic, I think.
Have a nice evening / good day! Clemens
spooky69 04-26-2008, 09:20 PM Cool, thanks for the quick reply! Once again I really appreciate the effort you put into creating this, and it's great that you're so open to feedback for future versions. I'll be interested in seeing what happens with the next version!
spooky69 04-27-2008, 04:20 AM Okay, I got proactive and created a Dictionary that seems to work really well, though it's awfully large (176,049 lines adding up to ~14mb) and a full search through the whole list takes about 80 seconds. This becomes a problem since if your word isn't found at all or you make a typo, you have to wait though the whole search or pop out the SD card. I really think the search needs to be smarter since it should be relatively easy for the program to find a word within an alphabetical list (I guess this wouldn't apply to any non-dictionary files, but when we're using this type of file it could stand to be a lot faster).
Anyway, haven't had any problems with this dictionary besides the long search times, though it includes suffix definitions and those lines start with the "-" symbol. If anybody knows of a text editor that can go through and find any line starting with that symbol and simply delete it, I think this Dictionary would be great.
By the way, here's where it comes from:
http://www.mso.anu.edu.au/~ralph/OPTED/
I guess it's basically that same 1913 Webster's dictionary from Project Gutenberg.
Clemenseken 04-27-2008, 06:10 AM Hi spooky69!
I appreciate your fast reaction and attitude towards improvements...
I'll be on holiday this coming week and intend to take my iBook with me. But then I don't know if I'll have time for my "hobby" while away with my family...
But end next week there might or (might not) be a new version with some of your ideas integrated. (I am aware that my program is not very apt for really large files, though, as yet.)
spooky69 04-27-2008, 07:19 AM Hey, I'll be keeping an eye out! A few of other things I noticed that need some attention in the future:
-I left the program open on a full charge and when I did something on the screen again it had drained my battery by half! It was only sitting there for 3 to 4 hours, and I assume this means it was actively reading off of the SD card the whole time. If it's possible, it really needs to sit "idle" when somebody's not using it.
-When going to the next/previous definition, it's significantly faster toward the beginning of the file than toward the end. When it's on a word in the "A" section, the flip to the next word is nearly instantaneous. I tried going to the next word after "Zebra" and I think it took almost as long as it would have to look the word up on its own.
-There are some minor graphical glitches present that I don't remember from the last version...here's a screenshot:
http://img329.imageshack.us/img329/4516/pictv2.jpg
I know it's hard to see, but there's a "return back" curved arrow over the title and there are some strange evenly-spaced "dotted lines" running right under the black bar at the top that you can see faintly in the picture. Let me know if you need any more info on these issues.
Clemenseken 04-27-2008, 01:52 PM First things first:
There is a new "add-on" feature for models prs505: it's another alternative keyboard layout (suggested by spooky69).
With this one letters are organized in an A-Z order (abc/def/ghi/...) which may suit 505-owners better, I assume. It wasn't much work, so I just post it here as a "Service Pack 1" for 505ers!
But be aware that this totally different layout needs an (only marginally) changed "autorun.js" file (included); whenever you decide to swap layouts (back) you'll have to swap "autoruns", too...
I left the program open on a full charge and when I did something on the screen again it had drained my battery by half! It was only sitting there for 3 to 4 hours, and I assume this means it was actively reading off of the SD card the whole time.
I noticed very soon when I had bought my prs500 that even READING from SD cards draws hard on battery power.
Functions in my app actually only run when called by some input (keys pressed). BUT it may well be that there are some system routines that now and then look what's happening; so I'd suggest that you switch off (MENU) the app while not needing it.
When going to the next/previous definition, it's significantly faster toward the beginning of the file than toward the end[...]
... as search functions work line-by-line: the sooner found the faster displayed. (I am thinking about some sort of "cacheing", though.)
... there's a "return back" curved arrow over the title and there are some strange evenly-spaced "dotted lines" running right under the black bar [...]
This funny "arrow" is absolutely new to me; hmmm, could be some different display "mode" from my prs500...
I am aware of these dotted lines; these will no longer be visible in 0.8/9...
And one more thing:
I made a little test with a 5MB file. Only reading the lines without actively searching took more than 30 seconds. So 15MB would be nearly 2 minutes!
Comparing a search word to "read" lines actually takes less time than reading them; I am afraid this does not leave much room for more efficient search algorithms in simple txt files...
Clemenseken 04-28-2008, 02:30 AM And one more thing:
I made a little test with a 5MB file. Only reading the lines without actively searching took more than 30 seconds. So 15MB would be nearly 2 minutes! [...]
It came to my mind this morning that I use a very old 16MB Multimedia Card (MMC) for development:
Its advantage is that the ereader can scan it very fast. And it's flatter than SD cards: so it's easier to insert.
BUT IT'S VERY SLOW.
I just repeated my test with spooky69's 15MB dictionary on a 256MB card:
Finding the last word (zythum) took about 50-55 secs.
Just reading the file took about 33 secs.
(You can imitate "Only reading" by using the next/previous buttons; that one just counts and reads lines without comparison.)
:help:
If anybody reads this post who is experienced with fast file access - you are urgently invited to share your knowledge: how can the fucntion "this.readline()" be quickened or replaced to get faster results ?!? (e.g.: omitting the first half of a file or s.th. else...)
Thanx a lot !!! Clemens
spooky69 04-28-2008, 04:07 AM It seems like you're on track to a solution, and if the universal search speed could get to under 15 seconds or so I'd be perfect happy. It seems that since a "book file" is able to move along incrementally without reading all the way through the file, the same should be possible as part of a search and/or "next word" function.
The obvious people to ask about this on here would be Kovid (http://www.mobileread.com/forums/member.php?u=6625) or igorsk (http://www.mobileread.com/forums/member.php?u=6287). I'd bet that they would both have some sort of input to offer on any problems and would probably both appreciate simply having the dictionary software available to use on their own Sony Readers.
A couple of other things: is there anyway to keep the software from starting automatically when I turn on my reader or unplug it from a charge? I guess it's simply launching automatically every time the card is read (such as when it starts up from a usb-connected state) but if there's any way to distinguish between the user popping out the SD card on their own during an "idle" state and whatever happens when it reads off the card automatically, then it might make just a tiny bit more usable. This is something I would ask the gurus above about, though it might involve a somewhat complicated solution to a relatively small problem...possibly something for a later version, once all of the program functionalities are ideal!
I'd also humbly suggest that you include the dictionary I uploaded in the main post (unless having those few lines starting with "-" would cause eventual hang-ups). I think that most people on here are looking for a standard English dictionary, and having that available up front will encourage more people to download the software and beta test it.
Once again, I appreciate the effort you're putting into this and I'll do whatever I can to help from the user-end standpoint.
igorsk 04-28-2008, 08:06 AM The dictionary by markscad (http://www.the-ebook.org/forum/viewtopic.php?t=8003) uses grep and that seems to be working pretty fast.
Clemenseken 04-28-2008, 03:14 PM The dictionary by markscad (http://www.the-ebook.org/forum/viewtopic.php?t=8003) uses grep and that seems to be working pretty fast.
Hi, igorsk!
While I am downloading the archive for that program (after using google-translate for the first time ever!): will I be able to decompress the extension ".7z" on my normal PC / Mac? I never heard that before...
Thanks! Clemens
Hey, a dictionary for my Sony Reader : Thanks, I think I'll give it a try :)
As for .7z, just look here : http://www.7-zip.org/ you should not have any problem to decompress your file.
It came to my mind this morning that I use a very old 16MB Multimedia Card (MMC) for development:
Its advantage is that the ereader can scan it very fast. And it's flatter than SD cards: so it's easier to insert.
BUT IT'S VERY SLOW.
I just repeated my test with spooky69's 15MB dictionary on a 256MB card:
Finding the last word (zythum) took about 50-55 secs.
Just reading the file took about 33 secs.
(You can imitate "Only reading" by using the next/previous buttons; that one just counts and reads lines without comparison.)
:help:
If anybody reads this post who is experienced with fast file access - you are urgently invited to share your knowledge: how can the fucntion "this.readline()" be quickened or replaced to get faster results ?!? (e.g.: omitting the first half of a file or s.th. else...)
Thanx a lot !!! Clemens
Hi Clements,
The slowest possible way to read/access a file is reading a line at a time. However this is the easiest way, and also my preferred way, because if it's simplicity.
One recommendation I have is to change the way you search trough a file. Instead of doing a word comparisons for each word I would implement a binary search until I get a match. (I'd stop at just getting the first letter to match then read one line at a time).
///////////////////// FEEDBACK /////////////
Love the change dictionary feature!
:thanks: this app gets better and better.
1) I would recommend instead of using 'ita.txt' as the default dictionary. could you maybe use a generic name like 'defdict.txt'
2) Is there a 'clear' button so we don't have to hit backspace to remove the text.
3) On the <Next/Prev> the text description is updated but the word that is being defined is not updated.
=X=
spooky69 05-09-2008, 08:04 PM ///////////////////// FEEDBACK /////////////
Love the change dictionary feature!
:thanks: this app gets better and better.
1) I would recommend instead of using 'ita.txt' as the default dictionary. could you maybe use a generic name like 'defdict.txt'
2) Is there a 'clear' button so we don't have to hit backspace to remove the text.
3) On the <Next/Prev> the text description is updated but the word that is being defined is not updated.
These are all good suggestions, but there still has to be a more efficient way to search large files. Can we get Kovid in here to tell us how to jump to a point in a file? If we're searching through a dictionary where all it can progressively look for longer and longer letter combinations and have a "smart" jump around it shouldn't have to read more than 40-50 lines to find any word I would think. It just needs to be able to hone in on the spot (and it should also have a way of ignoring junk lines that are out of place and don't fit in with the lines around it). If there's a way to jump to a line within a text file, I could describe a simple search algorithm for alphabetical lists and you could program it without too much trouble I would hope.
spooky69 05-09-2008, 08:24 PM Also, how about a "search status" icon, even if it's just an indicator that pops up in the corner while the search is active.
I also wouldn't mind a different control scheme...it's awkward to use both the directional pad and the numbers at the same time. Plus, it's really easy to accidentally hit the enter button and have to wait through a long search you didn't want to do (with no indication that it's searching other than it won't let you input). There should be an options menu that lets us switch to a scheme where the page turn buttons move the cursor on the keyboard and the d-pad is used to look up the next definition. With that scheme you can type one-handed with all of the buttons on the right side or have your left hand on the alternate bottom-left page turn button to move the cursor (seems much more handy than using the d-pad since you're going to be using the cursor movement a lot more than the "next word" feature).
Clemenseken 05-10-2008, 03:54 PM @spooky69:
Hi!
As I mentioned in my very first post to this thread, this was meant to be a simple dictionary launcher.
I am not a programmer - and do not plan to buy or sell Yahoo or Microsoft, either. ;)
My aim is not to be better than the Oxford Concise Dictionary or the like.
I just felt the lack of any dictionary for my little Sony-500. That's why I took the trouble to find ways to get a decent translation from other languages on this device.
I fully understand your wishes, demands and suggestions. One or two of these also came to my mind but were not that important at the moment to give them first priority.
There are other activities in my day-to-day life apart from delivering input for this project. :book2:
For example I am about to finish a game for my Sony (somewhat similar to Sudoku). That has mainly been on my mind for the last 2 weeks - when doing any programming at all ...
I probably will not ask igorsk for help on the improvements you suggested in your last two posts (I did test functions like "match" or "exec" with "regExp" - but there is no documentation for javascript on Sonys - so it's quite some trouble to get any progress. I am still trying...)
"match" (in a String) actually runs a lot faster that "readLine", I admit. But it does not work with files significally larger than one MB. There may be natural limits to "String" or I missed some detail required.
But anyway I don't mind anybody using my code so far as base for an application of their own.
So there's still hope for you: Just go ahead!
It may take another week or two until I have results for my tests. It might take a little longer, then...
(;) I will ask my product marketing team next time what they think I should promise or announce...)
lisak 05-21-2008, 08:59 AM Ok, so I finaly found some time to look at the source code and do some tests. I am especialy eager to find the solution for the large dictionary files, but so far it seems that I am stuck. ;(
Basicaly, I wasn't able to find any other method for reading from Stream object than readLine, which is used exclusively in all Sony Reader js applications I've found. stream.read(n) doesn't work, neither does stream.skip(n). Unless we find some way how to traverse through the stream faster, we won't be able to get significant speed boost, I am afraid.
I hoped I would be able to find something in /opt files in my PRS, but unfortunately, igorsk ebook.py dumper doesn't work for me (probably because I have PRS505) - it says that the device is not connected.
Does anybody have the idea how to progress? A dump of scripts from PRS might be usefull, maybe together with tinyhttp and libtinyhttp.so files, if somebody has it at hand...
EDITED:
Ok, I wish I read the previous posts here before I wrote this one - grep and runCommandResult would be probably the way to go.
These are all good suggestions, but there still has to be a more efficient way to search large files.
@spooky69
I realized my post was misleading. The 2nd half which you quoted me on was not my recommendation. More suggestions for a cleaner experience.
My real suggestion for finding a word was using a "binary search" algorithm. I aplogoize for those that are not programmers and do not know what that means. Let me give a quick "Laymans summeary"
The binary search is a very very simple search designed for speed and simplicity. Essentially what it does is search through a file/array and cuts the search by half every time reducing the search time by half every time. This gives a mathematical search time of log n.
Here is the algorithm.
What you need to know before the algorithm starts.
* The array size/file size in line numbers
* Must be sorted (dictionaries usally are)
Say we have a file 26 lines long. Each line is the first letter of the alphabit
>We are looking for the word J
MIN = line 1
MAX = line 26
As we do our algorithm the boundary of the MIN/MAX will shrink as we get
closer.
1) Jump to the half the current size(MAX-MIN). We jump to line 13. That is the letter is "M"
2) Compare "J" to "M". "M" is too large so we search down
3) Cut the max size from 26 to 13.
4) Now look at 1/2 the new MIN/MAX(13-1)/2. We get 6.5 so we round to 7.
5) Compare "J" to the MIN+7. That is the letter "G". "J" is larger than "G" so we set the MIN to 7
6) Now take the 1/2 of the new MIN/MAX = (13-7)/2 = 3
) Compare "J" to the MIN+3 = 10 (remember the new min is 7)
7) BINGO we found a match.
If you notice the sequential search would have taken us 10 reads to find "J". The "binary search" algorithm only took 3 reads.
The real hard part is SONY's API since it is not published I don't know if there is a way to jump to line numbers.
__
Cheers
=X=
spooky69 05-21-2008, 04:01 PM @spooky69:
But anyway I don't mind anybody using my code so far as base for an application of their own.
So there's still hope for you: Just go ahead!
It may take another week or two until I have results for my tests. It might take a little longer, then...
(;) I will ask my product marketing team next time what they think I should promise or announce...)
Sorry about the flood of suggestions! I really think the button switching is essential since it would make a lot more sense to have the page turn buttons act as the cursor on the 505 and would make typing about 75% less awkward. That would be my #1 change I would make for better usability. I'm not a programmer but I'd love to see other people take a crack at this thing once you've got it to where you want it.
@spooky69
If you notice the sequential search would have taken us 10 reads to find "J". The "binary search" algorithm only took 3 reads.
The real hard part is SONY's API since it is not published I don't know if there is a way to jump to line numbers.
This is pretty similar to what I would have suggested as a search algorithm, though I think there's a way of programming slightly smarter "jumping" in a set of data this large and of this type. If we can figure out a way to get it to jump to a line, then I'll give my best shot at describing one.
Clemenseken 05-22-2008, 05:07 AM Hi!
I did -some time ago- try to get "readline" to jump to a specific line - w/o success.
If anyone finds a working way, THAT would be the most elegant solution IMHO...
In order to make search faster anyway, I looked into some general javascript docu and found/tested "match"; that works a lot faster but did not "like" larger dictionary files (that ran with the original "readline" w/o problems). Hmmmm.
So here's the altered code from my function "getDict":
{try {var stream = new Stream.File(dPath);
var binSea = String(stream);
var aaa = eval("/\\n"+this.cNum+".*/");
var Ergebnis = binSea.match(aaa)+"";
if (Ergebnis != null) found=1; [...]
If anybody is experienced or has time on his hands the "readline" jumping certainly would be a :) "major breakthrough" :) in relation to larger files...
Thanks for any help / proactive development!
Hi,
at first a big greeting from germany to germany :-)
I just tried your dicitionary and it's a really useful enhancement to the reader.
I will use it more intensivly if I find a good dicitionary (and when I read my next english book of course :book2:)
I hope that the problem with the long searchtime is solved soon. If there is no way to jump to a specific position in the file, it would be although possible to use several files instead of just one (e.g. one foreach letter, this would speed up the search by a factor of up to 26)
Another improvement would be to change the input method and to one similiar to cellular phones:
press 1 once for A, twice for B and three times for C
if you want to write letters which are nearby, (e.g AB, EF, ...) it would be necessary to use a timer
or to press another button to indicate that one letter is finished and you want to type another one.
But this would be of course just a nice addon feature, the improved search is for sure much more important.
So have a nice holiday
Greetings Bube
igorsk 05-22-2008, 07:12 PM To read a line in middle you first need to determine all line ends before that. And to do that you need to read all the data up to that point, so it kinda defeats the purpose. You could try to use byte-granular binary search I guess... but why not just use grep as it's fast enough?
Clemenseken 05-23-2008, 03:45 AM You could try to use byte-granular binary search I guess... but why not just use grep as it's fast enough?
Hi igorsk,
how would I invoke grep from a .js file? And doesn't "match" (which uses regular expressions) do the same, basically?
(I have only a vague knowledge of Unix/Linux; sorry.)
igorsk 05-23-2008, 04:06 AM I linked to the alternate dictionary implementation above, why not have a look at it?
Anyway, here's the line which does the lookup:
this.runCommandResult("/bin/grep '^"+target.word+" =' /Data/database/media/books/lenru.txt");
Where the text file has lines of the following format:
abbacy = n должность или звание аббата
abbe = n фр. церк. 1) аббат; 2) отец (обращение к священнику)
abbess = n настоятельница монастыря, аббатиса
Clemenseken 05-23-2008, 02:43 PM I linked to the alternate dictionary implementation above, why not have a look at it?
Thanks for your help, igorsk.
I DID look up the link when you posted it some time ago - but the site for me only has a lot of question marks (no Russian fonts here on my HD) and a further-going link did not work with me...
BUT: I will try your code example below asap!
this.runCommandResult("/bin/grep '^"+target.word+" =' /Data/database/media/books/lenru.txt");
scottsan 05-23-2008, 03:36 PM xxxxx
scottsan 05-23-2008, 03:51 PM Pardon my ignorance, but what is version .05? I have a prs505; which file do I use and where do I put the dictionary. I tried DictioLauncher05_505_SP1.zip (544.3 KB, 203 views), placed the dictionary (.txt) in the software folder, but when I inserted the sd card into the device nothing happened. I'm just hoping that if SONY ever releases a firmware update it will have a dictionary function.
Keep up the good work.
Scott
lisak 05-23-2008, 04:30 PM BUT: I will try your code example below asap!
Please note that you also have to include the definitions of all support functions (originaly taken form universal flasher utility, I think) & addon library libfskLoad.so as well - getComandResult is not a native javascript function.
I did a few tests and it should be fairly easy to reuse that code, but so far I didn't have the chance to get it running properly.
lisak 05-24-2008, 01:18 AM I did a few tests and it should be fairly easy to reuse that code, but so far I didn't have the chance to get it running properly.
Ok, it is working now - rather crudely, but the concept is clear, I think. Seeking time is approx. 4 sec for first search due to load of supporting library, next searches are quicker (14MB dictionary).
Clemenseken, let me know whether you intend to release a new version with this feature (I can provide you with my code, if you'd like to use it) or if you're busy so I shall continue with the tweaking. Some things will have to be reworked (eg. previous/next buttons), but it shouldn't be a big problem, I think.
@igorsk
That's why you da man! Yes calling a binary to do the search would be way faster than having an interpreted language do all of the work.
@clemente
If you already know this please ignore. But you will have to get rid of the '=' sign form igorsk original post for the search to work, since the dictionaries do not have an '=' after the definition word.
this.runCommandResult("/bin/grep '^"+target.word+" =' /Data/database/media/books/lenru.txt");
change to
this.runCommandResult("/bin/grep '^"+target.word+" ' /Data/database/media/books/lenru.txt");
Clemenseken 05-25-2008, 01:32 PM Ok, it is working now - rather crudely...
[...]Clemenseken, let me know whether you intend to release a new version with this feature (I can provide you with my code, if you'd like to use it) or if you're busy so I shall continue with the tweaking. Some things will have to be reworked (eg. previous/next buttons), but it shouldn't be a big problem, I think.
Hi lisak,
well, I'm afraid it would be best (for us all) if I accept your offer to let you (and maybe others...) do the further "tweaking".
I think it would make sense if you post your version here, and I place a link (or your original file) on the starting page of this thread. Then, I'd prefer it (from sentimental reasons) that you somehow give your "code" an - at least slightly - different name. (Especially as this may be the start of an "open project" among members here at mobileread...)
I am busy with other things now and then; I will probably understand your code rather well - but might not be able to implement it myself very easily.
@lisak
:smack: The first time I read your post, I didn't realize you had it working. Would have saved me several hours.
Hi Clement/All,
Since you mentioned you did not have much time to work on the speed issue,
I spent some time updating the Dictionary to work using the 'grep' tool. This has speed up the search from ~45sec to ~1 sec. (there is a 10sec hit for the first search).
Clement feel free to merge what you like from the code and discard what you do not like. :)
NOTE: The changes where only tested on the PRS-505. PRS-500 users please let me know if you have any issues.
INSTALL STEPS
Unzip the file in the
<Card >\Sony Reader\software
folder this will create a "Dictionary" sub folder
<Card >\Sony Reader\software\Dictionary
Copy the autorun.* files up one directory
copy autorun.* <Card >\Sony Reader\software\
Create a directory 'dict' sub directory under
<SONY>\database\
and place the dictioanry *.txt files in that new directory
copy <Card>\Sony Reader\software\dictonary\*.txt <SONY>\database\dict
CHANGES
Quick Search: Uses ‘grep’ to find word, speed increased. First search is approx 10sec, 1 sec after that.
Quick clear: The mark(bookmark) now clears the word entry field
Quick word type: Prev/Next keys remapped to move the keyboard left right. -Previously the user had to type the word with one hand. Now the user can use on thumb for navigation left/right and the other thumb for the text selection.
Changed the default dictionary from loading ‘ita.txt’ to ‘dictionary.txt’
NOTE: Dictionary location has changed. To ‘/Data/dictionary/dict’ of from the windows world ‘<your drive>\dictionary\dict
’
BROKEN
Next/Prev word does not work as before. Now the next/prev word will start from the beginning of the dictionary
=X=
Clemenseken 05-31-2008, 08:36 AM Hi Clemens/All,
Since you mentioned you did not have much time to work on the speed issue,
I spent some time updating the Dictionary to work using the 'grep' tool. This has sped up the search from ~45sec to ~1 sec. (there is a 10sec hit for the first search).
Clemens feel free to merge what you like from the code and discard what you do not like. :)
Hi =X=
I just downloaded your improved ***speed version*** of the dictionary software but did not have time, yet, to look into your code...
I AM REALLY GLAD, YOU DID THE IMPLEMENTATION as I'm totally inexperienced with linux/grep. And I learned that even minor faults with syntax can take you hours/days to get it running...
I just yesterday finished a game I was doing for sony-PRSs and will have time from coming week on to get your code mixed into my "older version".
But I will put a link to this your previous post on page 1 of this thread right away!
Than=X= again! (& pardon the pun,) Clemens
Hi =X=
I just downloaded your improved ***speed version*** of the dictionary software but did not have time, yet, to look into your code...
I AM REALLY GLAD, YOU DID THE IMPLEMENTATION as I'm totally inexperienced with linux/grep. And I learned that even minor faults with syntax can take you hours/days to get it running...
No worries I'm glad the code is well received! Changes should be easy to see/understand but feel free to contact me if you have any questions.
I just yesterday finished a game I was doing for sony-PRSs and will have time from coming week on to get your code mixed into my "older version".
But I will put a link to this your previous post on page 1 of this thread right away!
Sweet! Will you be posting it here?
Than=X= again! (& pardon the pun,) Clemens
No worries, that's quite clever actually.
=X=
Clemenseken 06-02-2008, 02:51 AM I just yesterday finished a game I was doing for sony-PRSs and will...
Sweet! Will you be posting it here?
Hi =X=
Yes, I will post it (today?). It's just a game I saw on my brother's cell phone and decided to re-create for me/fun...
It is similar to breakout, but you have to "align" differently coloured patterned balls in a way that gives you the maximum amount of points.
I called my clone 5Balls.
BTW, I'll send you a PM asking for some explanations concerning your development on the dictionary project - but probably not today.
lisak 06-02-2008, 03:45 AM Alas, it seems that I am late as usual. I just came to let you all know that the reworked version of the dictionary will be available today's evening (CET), but it seems that the work is mostly done... :smack:
Anyway, maybe there will be some additions you'd find useful after all (eg. I have function for previous/next word working, addition of the status line etc.) - hope somebody'll like it. I'll do a quickscan for enhancements suggested here and I'll try to implement at least some of them for the added value. :)
@lisak
:smack: The first time I read your post, I didn't realize you had it working. Would have saved me several hours.
Hi Clement/All,
Since you mentioned you did not have much time to work on the speed issue,
I spent some time updating the Dictionary to work using the 'grep' tool. This has speed up the search from ~45sec to ~1 sec. (there is a 10sec hit for the first search).
Clement feel free to merge what you like from the code and discard what you do not like. :)
BROKEN
Next/Prev word does not work as before. Now the next/prev word will start from the beginning of the dictionary
=X=
lisak 06-02-2008, 05:26 PM Ok, here's my version, as promised:
Instalation:
- unzip archive
- connect your reader to the computer
- copy everything from "card" directory to your card (your original autorun.* files will be overwritten - back them up, if you think you'll need them)
- copy everything from "prs" directory to internal memory of your Sony Reader
- disconnect reader - the program should start
What's new:
- search via grep - features are the same as described by =X=
- additional button for clearing all text from input field (marked '<<')
- prev/next line buttons working (expect slight delay after first keypress, after that it's pretty much immediate)
- status line showing some additional info for user added - not used heavily in the current version, but might be useful in the future
Following might be of interest to programers :chinscratch: :
- I have everything prepared for showing of "hourglass" icon during the search, but unfortunately I haven't found the way how to force-update the screen while a function is running (normaly, redraw is done only when reader is "idle") - as a result, the icon would show only after the search is completed :(
- The program itself should be now more modular & readable for other contributors - I rewrote major parts of the code, renamed variables/functions to English and added a lots of comments. You tell me if it's for better or not. :)
- A slightly different way of input-mapping can be activated by setting "threeButton" to true - description of the mapping is in the code.
Well, that's it. Let me know if you find it useful (or if it's at least running...). Once againg, big thanks to Clemenseken for making such a great & useful program!
Clemenseken 06-03-2008, 03:16 AM Alas, it seems that I am late as usual. I just came to let you all know that the reworked version of the dictionary will be available today's evening... [...]
Ok, here's my version, as promised:
Instalation: [...] What's new: [...] Following might be of interest to programers [...]
Well, that's it. Let me know if you find it useful (or if it's at least running...). Once againg, big thanks to Clemenseken for making such a great & useful program!
@ lisak &
@ =X=
Hi, you both!
Thank you very much for your impressing work on this.
As I repeatedly mentioned here before, I am no "real" programmer.
(must admit I understand only vaguely what libfskLoad.so or myvm2.xml are needed for...)
Well, so I'd like to suggest that you two get together and try to merge your improvements to my original code. (From a programmer's point of view there must be quite a few. But as asked before, I'd be grateful if you used a slightly different name for it.)
BTW - has one of you (or other member here) found a way to completely transfer the autorun "system" to internal memory, so an SD card is no longer needed?
THAT would be the next fundamental step (IMHO) as I still suspect SD cards to draw hard on battery life...
Thanks again!
As I am just so able to understand what you did, I am certainly not the one to keep the project running. (But having done the basic code and developing the idea in itself is good enough for me.)
Clemens
(P.s.: I will post a game for Sony eReaders here in the next few hours. But as I own a PRS500 "only" I can't estimate its usability for PRS505s very well... It's called "FiveBalls.". )
lisak 06-03-2008, 04:17 AM BTW - has one of you (or other member here) found a way to completely transfer the autorun "system" to internal memory, so an SD card is no longer needed?
THAT would be the next fundamental step (IMHO) as I still suspect SD cards to draw hard on battery life...
Just a short comment on that - as far as I am aware, this would require some change to the original firmware of PRS (resp. changes to Linux distribution it runs on). For 505, nobody is really willing to experiment in that area, because there's no firmware image provided by Sony for this version and it is rather easy to brick the reader by some error in the code. For PRS500 might be the situation better, though I am not aware about any hack that would allow running of arbitrary javascript file in tinyhttp (but I didn't really look for it, actualy).
(P.s.: I will post a game for Sony eReaders here in the next few hours. But as I own a PRS500 "only" I can't estimate its usability for PRS505s very well... It's called "FiveBalls.". )
Great! Can't wait!
@lisak
Wow you've completed re-wrote the code! I must say you did a bang up job.
@clement/lisak
The changes both lisak are very similar, however lisak did a much better job in cleaning up the code and commenting it. I recommend lisak's code be used for the next release. There is no need for any merging in either your code or my code, lisak's code is a complete re-write.
@lisak
Here are a few comments on you implementation
Keyboard: Is it possible to have two lay outs. Personally I like clements QWERTY lay out but I see value in the ABC... Is it possible to code two UI and have the user select their preference?
Logs: There are still logs getting pumped out, for releases it's best if we disable them.
LIB: I've recommend adding the line 'this.prepareScript()' to the 'loadDict' method. This will move the load time of the lib to the load time of the app, but this way the user will not experience a hit on their first word search. (having to wait for the app to load, then wait for the search is a pain)
// Here are some of my suggestions for keyboard mapping.
KeyMapping: In my release I changed a few buttons maps for quicker entries. I'd like to add these keys to your code. Change the <mark> button to call 'clearInput' Change the "Next/Prev" from find next word to moving the keyboard cursor left/right.
Well, so I'd like to suggest that you two get together and try to merge your improvements to my original code. (From a programmer's point of view there must be quite a few. But as asked before, I'd be grateful if you used a slightly different name for it.)
@clemente I don't think we need to merge our code. The changes are made are very similar to liask. I say we use liask's code as is w/o merging.
BTW - has one of you (or other member here) found a way to completely transfer the autorun "system" to internal memory, so an SD card is no longer needed?
THAT would be the next fundamental step (IMHO) as I still suspect SD cards to draw hard on battery life...
I've kind of speculated on what that would take. Here is my post on "Wolf's" New Hack for the SONY 505"
http://www.mobileread.com/forums/showpost.php?p=182826&postcount=93
My motivation from moving it from the card is for hardware life of the SD card reader. the more you eject the card the greater chance of damaging the reader and the card. Also it would be nice to load the dictionary from a button press instead of eject/re-inserting the card.
However lisak is correct. Until SONY comes out with their firmware release anything non trivial is being avoided.
(P.s.: I will post a game for Sony eReaders here in the next few hours. But as I own a PRS500 "only" I can't estimate its usability for PRS505s very well... It's called "FiveBalls.". )[/QUOTE]
lisak 06-04-2008, 01:17 AM @lisak
Wow you've completed re-wrote the code! I must say you did a bang up job.
Thanks... :o
@lisak
Here are a few comments on you implementation
I created dictioLaunch pages (http://code.google.com/p/dictiolaunch/) at Google Code, where I listed all the suggestions you've mentioned (and some more) so they won't get lost. I admit it might be an overkill for a project of this size :p, but I wanted to try this service out for some time and this provided me an opportunity.
Let me know if you or Clemens (or anybody else, for that matter) want to have access to svn - I'll add you right away and we can work on it together.
LIB: I've recommend adding the line 'this.prepareScript()' to the 'loadDict' method. This will move the load time of the lib to the load time of the app, but this way the user will not experience a hit on their first word search. (having to wait for the app to load, then wait for the search is a pain)
I understand, there's a problem, though - due to the "unconditional" start after card change/usb disconnect, the dictionary is started after such an event regardless you want to start it or not. I guess it would be rather annoying if you had to wait ('cause script preparation is uninterruptable, AFAIK) every time after you disconnect the reader even if you don't want to use dictionary at all.
Still, I think this approach can be used - one of improvements I'd like to see is to introduce some "start-up menu", which would be than used for executing a specific application (so that you can have eg. sudoku & dictionary at the same card). prepareScript would be then called right after user confirms s/he wants to start DictioLaunch.
KeyMapping: In my release I changed a few buttons maps for quicker entries. I'd like to add these keys to your code. Change the <mark> button to call 'clearInput' Change the "Next/Prev" from find next word to moving the keyboard cursor left/right.
I agree with <mark> change (at least until we have some better use for it), but regards next/prev - how do we get to next/prev line then (this functionality can be useful when you run into synonyms)?
rhadin 06-04-2008, 08:49 AM Ok, here's my version, as promised:
Instalation:
- unzip archive
- connect your reader to the computer
- copy everything from "card" directory to your card (your original autorun.* files will be overwritten - back them up, if you think you'll need them)
- copy everything from "prs" directory to internal memory of your Sony Reader
- disconnect reader - the program should start
:blink: I'm new to this and downloaded your file. When I unzipped it, I didn't find either a "card" directory (which I assume means the SD card) or a "prs" directory. Can you tell me which files that are included in the zip file go to the card and which to the Reader? Are there any other files I need? Thanks.
lisak 06-04-2008, 10:29 AM :blink: I'm new to this and downloaded your file. When I unzipped it, I didn't find either a "card" directory (which I assume means the SD card) or a "prs" directory. Can you tell me which files that are included in the zip file go to the card and which to the Reader? Are there any other files I need? Thanks.
This is strange - I re-downloaded it and after unpacking, the directories were there. Are you sure you did "unpack with whole path" unzipping? I don't know what software for unpacking do you use, however the structure of the unzipped archive should look like this:
├───card
│ │ libfskLoad.so
│ │
│ └───Sony Reader
│ └───software
│ │ autorun.js
│ │ autorun.xml
│ │
│ └───skins
│ labels.png
│ skinMain505.png
│
└───prs
└───database
└───media
└───dictionary
default.txt
dict.dat
wb.txt
I understand, there's a problem, though - due to the "unconditional" start after card change/usb disconnect
I think you misunderstood the point I was making, sorry for the confusion. The point I was addressing is something you hinted on post
Earlier Post from liask (http://www.mobileread.com/forums/showpost.php?p=188501&postcount=56)
The first time a search is preformed there is a 4sec-20sec delay because the library 'libfskLoad.so' is getting loaded for the first time.
My recommendation was to make the first call during the loadDict methods so that the user does not experience the delay on the first search.
As an aside note, I've noticed that this trick works only when the card is ejected/reinserted. Some how the USB disconnection does not work.
As for the google sure good idea.
I agree with <mark> change (at least until we have some better use for it), but regards next/prev - how do we get to next/prev line then (this functionality can be useful when you run into synonyms)?
Currently the Up/Down and Next/Prev are mapped to the next word search. My recommendation was to only remap the Next/Prev key to the left <-> right keyboard and leave the Up/Down as is.
I know it is a matter of preference, I just find it easier and quicker to be able to use both hands to type a word than having to use one hand.
This is strange - I re-downloaded it and after unpacking, the directories were there.
├───card
|└───Sony Reader
└───prs
|└───Database
@liask
What OS are you using, it looks like Linux(Unix)
For the Windows world, the <Card> and <PRS> root directores do not exist.
It is:
<Drive>:\Sony Reader
<Drive>:\Database
lisak 06-04-2008, 11:42 AM I think you misunderstood the point I was making (...)
My recommendation was to make the first call during the loadDict methods so that the user does not experience the delay on the first search.
Well, but loadDict() is called from init() function, which is in turn called everytime the dictionary starts (which is in my case even after I disconnect USB cable - don't know why...)
My recommendation was to only remap the Next/Prev key to the left <-> right keyboard and leave the Up/Down as is.
Ok, using two hands for writing definitely makes sense - let's remap this according to your idea.
What OS are you using, it looks like Linux(Unix)
For the Windows world, the <Card> and <PRS> root directores do not exist.
Definitely weird - I am running Win XP atm and I have them there (the output was done by tree command). I packed the archive with Total Commander internal zip archiver, however, I'll try to repack it with Winzip or something...
Here it is - try this archive: http://dictiolaunch.googlecode.com/files/DictioLaunchX-0.81.zip
rhadin 06-04-2008, 12:14 PM Definitely weird - I am running Win XP atm and I have them there (the output was done by tree command). I packed the archive with Total Commander internal zip archiver, however, I'll try to repack it with Winzip or something...
Here it is - try this archive: http://dictiolaunch.googlecode.com/files/DictioLaunchX-0.81.zip
I figured out my problem based on your comments. I was double-clicking on the zip file to open it with Winzip rather than asking Winzip to extract it. When you double-click on the zip file, all you get is a list of files -- no directories; if you extract instead, the directories Card and PRS are created by Winzip and the files correctly placed. I am sorry for putting you through this when it was my misunderstanding of what to do. I do appreciate your responding. :thanks:
LATER: I must have done something wrong becuase I can't get the dictionary to work. Here is what I did: After extracting the files from the zip file, I copied the PRS folder and all of its contents to my Reader. I then copied the Card folder and all of its contents to the SD card.
I thought perhaps it should be done some other way, but the only way I could get the Sony software to copy over all of the files to the SD card was by copying the entire folder. Sorry to be so lame about this, but what am I doing wrong?
Well, but loadDict() is called from init() function, which is in turn called everytime the dictionary starts (which is in my case even after I disconnect USB cable - don't know why...)
Okay I re-read my last post, definitaly as confuion as my first. Let me have one more go at it.
Put a function call 'this.prepareScript()' in the loadDict() method, or in the 'init()' method. This way when the app is loaded it calls the calls the 'init()' which calls then prepareScript. This way the libfskLoad.so file is copied to the /tmp directory when the application is loaded and not on the first word search.
=X=
lisak 06-04-2008, 02:22 PM Okay I re-read my last post, definitaly as confuion as my first. Let me have one more go at it.
Put a function call 'this.prepareScript()' in the loadDict() method, or in the 'init()' method. This way when the app is loaded it calls the calls the 'init()' which calls then prepareScript. This way the libfskLoad.so file is copied to the /tmp directory when the application is loaded and not on the first word search.
=X=
:smack: Ah yeah, stupid me :(. Yes, this is clearly inefficient. Actualy, we should probably do a getFileInfo check on existence of the library in /tmp and skip the copying altogether if the file exists.
I promise from now on I'll be paying more attention to what you're trying to get across. :o
lisak 06-04-2008, 05:25 PM LATER: I must have done something wrong becuase I can't get the dictionary to work. Here is what I did: After extracting the files from the zip file, I copied the PRS folder and all of its contents to my Reader. I then copied the Card folder and all of its contents to the SD card.
Just to be sure: Did you copy only the content of the respective directories, or the directories themselves? The correct result is that you should have libsfkLoad.so and myvm.xml (together with all the rest) in the root of the card, not in "card" subdirectory. The same is valid for prs folder (only its content should be copied to root of the internal memory of the reader).
If you did it correctly, at least the dictionary screen should show up. Anyway, try to use this new version (http://dictiolaunch.googlecode.com/files/DictioLaunchX-0.85.zip), it has some improvements so that eventual errors should be identified more easily (changelog here (http://code.google.com/p/dictiolaunch/wiki/ChangeLog))
rhadin 06-04-2008, 06:41 PM Just to be sure: Did you copy only the content of the respective directories, or the directories themselves?
Lisak, I apologize again for being such a twerp about this but here goes :):
I copied the directories themselves because I couldn't figure out how to copy just the contents using the Sony software. I could use Windows Explorer to copy the PRS files to the Reader, but not the Card files to the SD card because Explorer doesn't recognize the SD card as a separate entity.
:dunno: How do you copy the files only to the SD card?
lisak 06-05-2008, 12:32 AM Lisak, I apologize again for being such a twerp about this but here goes :):
I copied the directories themselves because I couldn't figure out how to copy just the contents using the Sony software. I could use Windows Explorer to copy the PRS files to the Reader, but not the Card files to the SD card because Explorer doesn't recognize the SD card as a separate entity.
:dunno: How do you copy the files only to the SD card?
Hmm, I am not sure whether Sony program allows you to copy the files into the root directory of the Reader - when you transfer them as normal books, they'll end with other books in a different directory. In my case, both the card and the reader's internal memory are identified as a two separate removable discs in Windows... Strange.
But never mind that - if this is really the case, you can use any card reader for copying files onto the card and the rest we can sort out - it actualy doesn't matter where the files in the internal memory reside, it's possible to set the paths in the program accordingly. But at least autorun.* files need to be in the right place first.
Clemenseken 06-05-2008, 03:08 AM Lisak, I apologize again for being such a twerp about this but here goes [...]
@rhadin
Hi! I am not replying specifically to your problem - but then again I may...
Just to exclude one possibility you should have a look at your unzip's preferences; it must NOT have the option "change line endings to win/dos" (or similar) selected!
I speak from experience, as my MacOS unzipper did change line endings by default!
So "Sudoku" would not run - so I got really deep down into its code - so I got the idea to build on its code - so I developped (the first two versions of) "DictioLauncher".
If your dictionary file somehow is not "recognized" this might be the cause. This is just a far shot - but when I asked all the "wizards" here at MobileRead about my problem nobody thought of it...
rhadin 06-05-2008, 09:41 AM But never mind that - if this is really the case, you can use any card reader for copying files onto the card and the rest we can sort out - it actualy doesn't matter where the files in the internal memory reside, it's possible to set the paths in the program accordingly. But at least autorun.* files need to be in the right place first.
Thanks, Lisak. Here's the current status.
I got the Card files onto the SD card correctly -- I know because the GUI for the dictionary appeared on my Reader. And I now have the dictionary accessible. :thanks:
My question now is this: Do you know where I can find an English dictionary to put on the reader?
lisak 06-05-2008, 10:59 AM And I now have the dictionary accessible. :thanks:
My question now is this: Do you know where I can find an English dictionary to put on the reader?
Excellent! And the answer to your question is: yes, for example here (http://dictiolaunch.googlecode.com/files/wb.zip). Just put it into "dictionary" folder in the reader's internal memory and use "Change dictionary" button - input "wb", press enter and you should be set.
BTW, =X=, today I noticed that after the implementation of your suggestion the search times were mysteriously and surprisingly cut down to 1-2 sec. - before that, it was always 10 sec for the first search after the program started. I can't believe that delays were caused just by the act of copying library itself (it's very small and file copy is rather quick), but maybe library (and information cached by "grep") stay now in the memory... :chinscratch:
Well, I don't know. But whatever the reason is, the fact is that it's now pretty much immediate, so big thanks to you that you insisted on implementation! :thumbsup:
Well, I don't know. But whatever the reason is, the fact is that it's now pretty much immediate, so big thanks to you that you insisted on implementation! :thumbsup:
Well being extremely impatient is not something to take credit for ;) but thank you.
Anyhow I think the slow down is due to how slow the Reader reads the SD card. I wonder how much faster the original solution would be if the dictionary was moved to the HD in the first place. No where near as fast as grep/sed but probably faster than 1min.
=X=
rhadin 06-05-2008, 03:11 PM Excellent! And the answer to your question is: yes, for example here (http://dictiolaunch.googlecode.com/files/wb.zip). Just put it into "dictionary" folder in the reader's internal memory and use "Change dictionary" button - input "wb", press enter and you should be set.
:thanks: Thank you, Lisak. I followed your instructions and it works great. Have some karma :thumbsup:.
If you did it correctly, at least the dictionary screen should show up. Anyway, try to use this new version (http://dictiolaunch.googlecode.com/files/DictioLaunchX-0.85.zip), it has some improvements so that eventual errors should be identified more easily (changelog here (http://code.google.com/p/dictiolaunch/wiki/ChangeLog))
Hi Lisak, Clemenseken & =X=,
Thank you guys for the great work, and it's definately a handy add-on which makes the reader versatile.
However, I have two problems with the dictionary since I'm using PRS-500 with direct page control :smack: that'll be great if you can give me some guidelines making the tool work on my reader:
1. ENTER seems to have been re-defined after I installed direct page control which comes from http://www.mobileread.com/forums/showthread.php?t=13003 How can I make your dictionary work with this setting?
2. The DictioLaunchX-0.85 seems to have more neat features than version 0.7b, but it doesn't seem to have a comparable PRS-500 version after I've read this thread over many times. Do you guys plan to have any PRS-500 update in the near future?
I'd love to contribute if I can, but I'm a novice in Javascript & XML. Maybe you can give me some guidelines on your code structure and some references on how to hacking sony ereader.
Thanks again for the nice job~ :thumbsup:
lisak 06-08-2008, 11:35 PM 1. ENTER seems to have been re-defined after I installed direct page control which comes from http://www.mobileread.com/forums/showthread.php?t=13003 How can I make your dictionary work with this setting?
Well, I am not sure how the hack is implemented, but if the behavior of Bookmark key was not changed as well, you can try to open "autorun.xml" file which resides on the card and change this:
<function id="doMark">
this.clearInput();
this.clearLines();
</function>
to this:
<function id="doMark">
this.centerKey();
</function>
After that, you should be able to search the term by pressing "Bookmark" button. You lose the functionality of clearing the input line by single button press, but you can still use virtual key << at the "keyboard". Another option would be to use the Zoom key, but so far I was not able to find any reference on what function ID this key has.
Do you guys plan to have any PRS-500 update in the near future?
Well, I personaly don't have the access to 500 model, so any serious work/testing would have to be done by somebody else. However, if you have some specific problem here, just describe it (either here or here (http://code.google.com/p/dictiolaunch/issues/list)) and we try to sort it out.
I'd love to contribute if I can, but I'm a novice in Javascript & XML. Maybe you can give me some guidelines on your code structure and some references on how to hacking sony ereader.
I am afraid that as far as references go, we're stuck with the code that's at hand (eg. sudoku game is an excellent sample code). If you're curious about something in this program, just write me an email (it should be possible through mobileRead, I hope) - guess it would be better than to clutter the forum here...
And thanks for all the praise! :D
Clemenseken 06-09-2008, 06:09 AM Hi @ Lisak and G@O!
Well, I personaly don't have the access to 500 model, so any serious work/testing would have to be done by somebody else.
As obviously you cannot test your modified version on a PRS500 I tried to collect information for such a version, and attached a suitable "skinMain500.png".
The array in autorun.js must be:
target.keyMap = new Array(
new Array('w','s','x'),
new Array('e','d','c'),
new Array('r','f','v'),
new Array('t','g','b'),
new Array('y','h','n'),
new Array('u','j','m'),
new Array('i','k','CD'),
new Array('o','l','CLR'),
new Array('p',' ','BS'),
new Array('q','a','z') );
Then your functions "clearLines" and "printLines" (and maybe others) need be reduced to 6 text lines. These lines are longer ("lineLength" about "50"?) each than in the 505 version (see autorun.xml).
In your function "arrowKey" "lineCursor.changeLayout" should (hopefully) be:
(541, undefined, undefined, 553+ this.xCol *48, undefined, undefined)
Maybe "this.xCol *48" needs a correction, though...
The positions for text lines in autorun.xml should be:
<!-- At top defined "id=sometext" has size="48" (instead of "40").
(L/R/T/H) "inputLine": 50/30/85/60
(TOP) "line1".."line6": 200,235,270,305,340,375
(L/R/H) "line1".."line6": 45/30/60
"statusLine": not defined - see "skinMain500.png".-->
You can of course run a PRS500 app/layout on your PRS505. It just feels a little "funny".
I hope to have made an easy adaption for us "505 oldies" possible. For more information just ask me. THANX!
Clemenseken & Lisak,
Thank you guys for such detailed explanation. I'll definately try it out once I have some down time and let you know how it works.
One more puzzle to me, the prs-505 version dictionary seems to put dictionary text file on internal memory, but prs-500 don't have direct access to it:
1. what's the advantage of putting dictionary file on internal memory? Does it consume less battery power and/or because of faster I/O speed?
2. Is there any walkaround for prs-500 on accessing internal memory? a) Do I have to use Igorsk's universal flash to copy files onto internal memory? b) Where in your codes can I specify it myself if I decide to put dictionary file on memory stick instead of internal memory?
I'll definately check out the Sudoku game on my reader :D Actually back to the school days I tried to solve sudoku by integer programming solely using Excel solver, but it requires over 280 binary variables whereas solver only support up to 200 variables :bookworm: maybe I'll try it in matlab next time
Anyway, thanks again for your time, you guys are awesome~!
G@0
joeanne12 06-09-2008, 11:19 AM Oh please please help, I have done somthing terribly wrong and frozen my 505. I unzipped DictoLaunchX-0.85 into a folder on my desk top and then connected my reader. I then double clicked on the card folder and copy and pasted the files onto my card. I then did the same with the prs folder and copy and pasted the database file onto the root directory of my reader and over wrote the database file that was already there. I think I was not supposed to do this. I did not back up my original database file and now the only way I can start my reader is by pushing the reset button and then it come up with the menu and is frozen. I can still get into the reader via my computer as it still comes up as a removable disk but ebook library wont see the reader. Also what files should I have on the reader memory?
I am running windows XP please help
Clemenseken & Lisak,
1. what's the advantage of putting dictionary file on internal memory? Does it consume less battery power and/or because of faster I/O speed?
The real reason for putting the dictionary on the memory card is that the 'grep' utility cannot access the memory stick. Sony developed a library so they could access the memory card. However this library does not work from the command line.
However there is a side benefit that the internal memorycard is quicker and requires less battery usage.
2. Is there any walkaround for prs-500 on accessing internal memory? a) Do I have to use Igorsk's universal flash to copy files onto internal memory? b) Where in your codes can I specify it myself if I decide to put dictionary file on memory stick instead of internal memory?
There is, you can either use your recommendation above. Or change the code in the autorun.js to copy the files for you to the /Data/media/database directory (of course you would have to create the directory too).
The real question is does the libfskLoad.so library works for the PRS500 if it does then updated support for the PRS500 will be easy. If it does not then the recent updates will not work with the PRS500.
At that point I would recommend PRS500 folk stick with Clemenseken original solution with version 7b.
=X=
spooky69 06-10-2008, 11:29 AM I've been away from internet access for a while but I just thought I'd drop in and say I'm glad to see that this project had been getting a lot more attention. I won't be able to try out the new versions quite yet but I'm excited to see that a lot of the issues have been resolved. I haven't read through the newer posts extremely carefully, but in case it hasn't been addressed yet I'll just say again that I'd really like to see the a different control scheme for the 505 where the page turn buttons (of which there are two pairs) are used to move the cursor on the keyboard and not for the "next/previous word" function.
Besides that, I'd just like to thank everyone who's put work into creating a usable dictionary for the Reader. It's definitely something that adds to the usefulness of the device and you guys have come up with some really solid improvements to the early versions. I'll try to check back in soon with some feedback about the new version(s).
joeanne12 06-13-2008, 02:29 AM :smack:found out what I did wrong and thought I'd share my stupidity incase anyone else did the same thing. I have learnt not to do these things at 2am when you are getting tired!!! I put the wrong files onto the wrong card!! Had to do a hard reboot to get into my reader again. Have since put the correct files in the correct place and all is working fine now. Although still had to do a few soft reboots before the reader liked the dictionary and didn't freeze?!? So thank you very much for a great program.:thanks:
spooky69 06-16-2008, 11:34 PM Hey, I just tried out lisak's newest version (after posting a report (http://code.google.com/p/dictiolaunch/issues/detail?id=9) about the old version, which doesn't work at all on the 505 because the enter key does nothing).
I really like the new version (which needs to be linked to in the original post instead of lisak's first one) and there are only a couple of things I'd change. There's a rectangular "null" character at the end of each definition. I said this on the first page but I noticed that the default dictionary file when I installed the new version was now wb1.txt and wondered if there might be an updated dicitionary file that fixes this. If that exists, I'd suggest repacking a new archive with all of the files included and editing the first post to refer to that.
I also think it's essential to have some way to browse through longer definitions, since they seem to end up rolling off the screen. The up and down buttons on the directional pad seem like they'd be perfect for this, though I imagine it might be a little tricky to program.
This is just a small thing, but I might suggest having the first letter input after looking up a term start a new line automatically instead of having to clear it manually (though still leaving the definition on the screen), though that depends on whether you think it's more likely that the average user would want to start a new search term (like they might do when they're trying to find what cuss words Webster left in) or whether they would want to add more text onto what they already searched for (like they might do if they accidentally hit the search button before finishing their "typing"). I think it would be a little more handy if the line cleared automatically as you started inputting more letters, but it really is a very small detail, especially with the bookmark button serving to clear with line with one button press.
Anyway, everything is pretty much where I need it to be to be usable and here's a big THANK YOU for changing the button configuration around. I also like the cursor at the top and bottom of the screen (I forget if this was in any older versions) and non-qwerty keyboard layout. It's fast enough now that I don't it needs an hourglass, and the only reason it needed one in the first place was because it was too easy to accidentally hit the enter button and have it seem "frozen." If you did find a way to put one in, go for it.
Aaanyyyyway, keep up the good work, everybody, and thanks again for making my Reader even better!
lisak 06-17-2008, 12:58 AM Thanks for the report & suggestions! Just a few quick comments from my side:
There's a rectangular "null" character at the end of each definition. I said this on the first page but I noticed that the default dictionary file when I installed the new version was now wb1.txt and wondered if there might be an updated dicitionary file that fixes this.
Do you use dictionary file from http://dictiolaunch.googlecode.com/files/wb.zip and
version 0.85 (I guess so, but I'd rather ask anyway) - I don't see the character you're talking about on my Reader now, though I know what you mean because I remember this from one of the older versions.
(the "wb1.txt" is actualy just a remnant from some testing, it has no real meaning whatsoever...)
It's essential to have some way to browse through longer definitions, since they seem to end up rolling off the screen. The up and down buttons on the directional pad seem like they'd be perfect for this, though I imagine it
might be a little tricky to program.
This is an excellent idea and it should not be too difficult to get it there. I originaly thought about changing the font for the longer definitions, but this is better solution (and probably easier). Thanks!
...having the first letter input after looking up a term start a new line automatically instead of having to clear it manually
I understand, though it would be probably wiser to have this included in some '"user settings" dialog I'd like to create. The problem is that we're slowly running out of usable buttons - and I still don't know how to use Zoom and Volume keys. <– never mind that, I found it :p
spooky69 06-17-2008, 02:27 PM That all sounds good to me. To answer your question (and my own, now that I think about it) I was using the 0.85 version of the program with the original dictionary text file I posted on here a few pages back (I deleted the whole directory when re-installing the 0.85 version and I only had the old version at hand). I suspect that if I went back and used your wb.txt file again, the problem would go away. [Just tried, and it did fix the problem]
A couple of other hang-ups/suggestions/musings:
-When I pop in the SD card I need to hit a button (any button, seemingly) before the program will actually pop up. Otherwise, it will just sit on the same screen. I don't remember if the first version of your re-write did this, but I know that Clemenseken's didn't. It does still load automatically when I start up the Reader, which is actually another little something that I'd like to see gone, though I understand why it happens.
-Yikes, just noticed this one: I also have to hit a button (any button again) after searching to get the definition to pop up. This was actually going to be another error to report, because it seemed like some of the results were showing up much slower than they should have (like "ant" and such). For now, I can just hit enter twice in a row and it will pop up after it finishes the search. On the upside, I can see now that this search is actually much, much faster than I thought it was when I posted my first impression.
-Speaking of start-ups, is there any way to get the actual script that's running onto the Reader itself? You may remember a post where I found that leaving the program open drains the battery very fast (about halfway down in 2-3 hours on my 505, I think it was), probably because the program is cycling while it waits for input. I haven't tested for any battery drain on the newer versions, but if it's possible (and doesn't impair the start-up time), it seems like it might be a good idea to move all of the program's functioning to the internal memory, with the autorun script on the card serving only to point to the script that's on the Reader and launch it.
-Finally, is there a way to make the "exit" button not also send that input to the regular Reader firmware? In all of the versions, hitting "menu" to exit program has also made the corresponding screen pop up when I'm back in the "main area". Since this is almost always going to be while I'm in a book, it has the potential to cause problems. Last night, it took me back out to the table of contents I was using on my reader, and sometimes you can't get back from that screen to where you were in the book without having to re-navigate back to that spot.
-Okay, wow, here's a whole big 'nother thing: several of the problems (both of the "have to hit any button to get it to work" things and also the "menu button" one directly above) seem completely fixed when I start the program over again. I am working on trying to reproduce these again, but it does seem to have to do with it running differently after the first time...okay, so...
There are a lot of variables here since I've been re-installing and changing dictionary files around, and I can't reproduce these errors again yet (restarting and doing a device shutdown didn't do it; reinstalling might but I'm about done messing around for today), but I think the fix has something to do with doing my first search after installing the new dictionary file and then restarting the program, since the errors happened consistently until I did that, at which point they stoppd. If this becomes a problem, I can be a little more thorough in trying to track down the caustation of the problems I had since I pretty much remember all of the steps that led up to it. Thing is, I'm pretty sure all of the errors that disappeared were happening last night when I was using 0.85 and the old dictionary file...I'll maybe report back later after doing a full deletion and re-install with 0.85 and the current wb.txt.
So, how's that for a really long, confusing list of interconnected troubles? I did just realize one more that's very easy to fix: hitting the "left" button on the directional pad when you don't have a search term (like I keep doing since I was used to old button configuration [the new one works much better for me by the way; thanks again]) makes it "freeze" up for about 10-15 seconds as it looks for a previous term behind nothing. You should just disable the "previous word" function until they've done a search (and it doesn't do the same "freeze" if you try to go to the previous word from the first line, so that's okay). You might still want to leave in the ability to use the "next word" button without having done a search, though, since that has some slight usefulness if somebody had a short list of somethingerother and wanted to scroll through it. In fact, you might just want to make the "previous word" button go to the last line of text file depending on how long the delay is...in fact, I'm thinking that this whole situation would be best fixed by disabling both the next/previous word buttons until after a search, since if somebody's pressing those right off the bat, it's going to be a mistake 99% of the time and any delay while that line is dregged up out of the text file is going to be frustrating for the user who isn't trying to look up "a" or "zythum". Was that a long enough explanation of my thoughts on the next/previous buttons and their role in the dictionary program before a search has been done? Maybe this is a problem best left to a future "user settings" feature.
And one other thing: after using the dictionary a few times, I really think that automatically clearing the input line when a new letter is entered after a search is probably the best default option. Leave up the definition in case the new input was an accident, but I've already had several instances where I spend a few moments typing out a new term and look over and find I'm about ready to search for dogrock or saxaphoneniggard.
So, there's a bunch of stuff. I'll try to pin down what was causing those problems that went away, but that will have to wait until I'm less frazzled from typing about this program so much!
Oh, and of course I just had to think of one more thing: I already said that the new version needs to be the one that's linked to in the first post (old one doesn't work at all on the 505, and I didn't check to see if Clemenseken changed this yet so forgive me if that already happened), but I'd also suggest that the next version's archive include a text file with installation instructions and a short user manual, since otherwise people might have to track that information down in the thread. OUT
lisak 06-18-2008, 09:26 AM Ooooh, heavy report! :thanks: - my comments are below
-When I pop in the SD card I need to hit a button (any button, seemingly) before the program will actually pop up. Otherwise, it will just sit on the same screen.
I know - this always happens for a while, then suddenly the problem mysteriously disappears and program is starting normaly. Somehow I'm in doubt whether the code itself has to do anything with it - actualy, the dictionary screen should pop out before a program code itself is executed. I'll try to do some tests to find out where exactly it hangs up.
I also have to hit a button (any button again) after searching to get the definition to pop up.
Hmm, I haven't encountered this one yet.
it seems like it might be a good idea to move all of the program's functioning to the internal memory, with the autorun script on the card serving only to point to the script that's on the Reader and launch it.
I know about the battery drain (I learned it the hard way - today I left my reader open with Dictionary running during the night and in the morning the unit was completely dead w/ some weird residuums at the screen - it scared the hell out of myself), but I am not sure if the sole fact that application is running from the card is causing this.
Anyway, I can shift autorun.js to internal memory, but autorun.xml has to stay where it is (I can use symbolic link to redirect it elsewhere, but card would be accessed anyway). I am still trying to find out how to start application without using autorun functionality, but it's only realizable through a hack, which is rather risky with 505 and somewhat difficult.
Finally, is there a way to make the "exit" button not also send that input to the regular Reader firmware?
I am afraid that the answer is "no", because I believe that "exit" from the book actualy happens even before dictionary is launched (when you insert the card, current viewer is interrupted, "main" application pops into foreground and then content of autorun.xml is evaluated). And I suppose that if we ever get the dictionary running without autorun.*, you won't be able to start the dictionary while reading at all. :chinscratch:
...several of the problems (both of the "have to hit any button to get it to work" things and also the "menu button" one directly above) seem completely fixed when I start the program over again. I am working on trying to reproduce these again, but it does seem to have to do with it running differently after the first time...okay, so...
See? Told you so. :p Don't be afraid, these glitches will return. But if you do find out what combination makes this one pop out, let me know.
in fact, I'm thinking that this whole situation would be best fixed by disabling both the next/previous word buttons until after a search,
Good idea. I still consider saving the last searched term (maybe last nine of them and access them via buttons...?), but I am not sure if anybody would find it ever useful (think 80/20 rule). This idea of yours might be a good quickfix.
Oh, and of course I just had to think of one more thing: I already said that the new version needs to be the one that's linked to in the first post (old one doesn't work at all on the 505, and I didn't check to see if Clemenseken changed this yet so forgive me if that already happened)
This is up to Clemenseken... I'd recommend to put a link to http://code.google.com/p/dictiolaunch/ there, where the latest version resides (alas, for 505 only...) and where also documentation will should be stored. :sweatdrop:
-Finally, is there a way to make the "exit" button ...night, it took me back out to the table of contents I was using on my reader...
Couple questions here. Are you double pumping? Hitting the button more than once.
I know one annoying artifact of using the Dictionary is that it must reside on the SD Card. When I am reading books that are located on the SD Card I tend to lose my location. It seems the Reader only saves the "current location" when you exit your book. One trick I've learned to get around this is to bookmark your location before calling the dictionary. At that point is will be very easy to get back to your location.
Spooky, while having the application auto clear the input box is a great feature for testing the dictionary, in practices it is more of a drawback. I find that when I'm actually using the dictionary to lookup the word I don't want it to clear the input box. Most words I lookup are very long by the time the dictionary loads I've already forgot how to spell the word. So I typically enter half then enter a few letters at a time to get closer.
We, however have two methods to enable a user to quickly clear the input either through the keyboard of from a button.
@lisak
Whith the application getting I wounder if it would be worth while to improve the installation process. I'd recommend we put ALL the files in one directory. and instruct all users to unzip the Dictionary-vX.zip into the "Sony Reader"
The Dictionary zip file would have a directory structure of so.
autorun.xml
autorun.js
+Dictionary\Skins
+Dictionary\<ALL Dictionary Files>
The autorun.xml file would have to be modified to point to the "Dictionary\Skins"
Any thoughts?
spooky69 06-18-2008, 02:03 PM See? Told you so. :p Don't be afraid, these glitches will return. But if you do find out what combination makes this one pop out, let me know.
I thought I'd found one (turning the page in a book), but it doesn't seem repeatable. I did notice a trend of, after turning a page, having to hit a button to get the program to pop up, and then having it come up fine when I do it again from the same page in the book. I'm still not sure that's not a real phenomenon, buuut...
After trying this a few times, it seems like it's almost 50/50 as to whether any individual insertion of the card will make the dictionary pop up correctly. I am pretty certain that the error was happening consistently for a period and then seemed to go away almost completely. Having just tried again from the main screen (without changing the screen, and having had it work the first time), the error popped up about two out of 10 times I put in the card.
If I had to guess, I think it has something to do with the computation/input cycles of the Reader itself. I can't determine any p |