Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - zz85

#1
I'm thinking of generating a music dictionary.

Can the definitions from the input file accept new lines? Eg.

Term     Defination1 \n Defination2 \n so on..
#2
Regarding digg, if you have digg accounts, do digg the article so it will move up the popularity and visiblity  ;)
#3
@jreiffers: Does your phone support MIDP 2.0? Or what's the jar limit of your phone? 1 of these limitations will cause the phone not to be able to load the mobile application.
#4
http://cornucopia.sourceforge.net/

Stumbled on this project while posting the digg article on DFM. They seem to share the same purpose as DFM, but its has not been updated for about a year. I see there are 3 developers on their sf project page. Maybe we should ask if they like to help DFM, so that there will not be a waste of resources.

here's an extract from their webpage.

QuoteHi!
Cornucopia (meaning) is an Offline Dictionary for Mobile Phone's/PDA's and similar resource constrained devices. It works on anything that supports MIDP 1.0 or above, constrained only by the maximum jar-file size supported by the platform.

Cornucopia was born out of a need. Authors of cornucopia are very frequent users of WordWeb and believe that it is the best lexicon around. But when searching for something similar that runs on mobile phones, they were disappointed. Hence it was decided to make one, that needed just MIDP 1.0 and nothing else. Also it was decided that it will not be an english only lexicon, but rather a bi-lingual one, as it was not a difficult thing to do both in terms of programming effort and content availability.

The first choice that was to be made, was on the selection of the base database, as a dictionary is only as good as its content. WordNet was selected as the base primarily because it is also the base of authors' favourite WordWeb lexicon and secondly because it was available under GPL.

But there were some major hurdles to be crossed. First, how was such a big database going to be managed on such a small device and second how to search this database for fast and efficent retrieval. This was a challange and the authors decided to take it and make conucopia a reality. Making it bi-lingual was considered secondary as neither the search nor storage strategy needed to be changed much once they were efficient enough to handle WordsNet's database.

After some thinking and testing the authors are proud to release Cornucopia (release name aurora) which has all the words and their meanings as contained in WordNet's database. The design has been documented enough that anyone who wishes to extend it can do it in minimum time. Authors request all of you to participate as much as possible by adding more databases to it, improving its UI design, improving its searching algorithms and by adding more bi-lingual conversion dictionaries to it.

Thanks and have a great time...!!!
#6
Regarding the German dictionary,

1. It should be rename to a zip extension
2. If it doesn't work, the class files in the jar "zip" should be removed. Extract the dictionary folder. Zip them up again retaining the dictionary directory in it.

It should load after that. This should be done with other dictionaries.
#7
Gert, thanks for your testing. Is there anyway to trace where the error is coming on the Nokia phone? What file is it trying to open?

It puzzles me too why it can load the dictionary but not let it search too.
#8
I have post an article on Wikipedia http://en.wikipedia.org/wiki/DictionaryForMids but it needs clean up and additional information.
#9
Modified from 3.1.1

1. It contains a File Browser so you can select the directory you want without remembering its complete path.

2. It can load zipped dictionaries. Zip up the dictionary directory and transfer to the phone. Use the file browser to select it.

Please test to see if it works on your phone.

dfm filebrowser and zipped dicts v1.zip - 0.27MB

Version 2 uses a vector to reduce the number of times the zip file needs to reopens, hence reducing the security prompts. The real way to solve it would be 1) Effective method to access the File system 2) Caching 3) Certificate

dfm filebrowser and zipped dicts v2.zip - 0.27MB

Here's the dictionary I used for testing
dictionary_engjpn_edict.zip - 6.57MB
#10
IMHO, maybe some people prefers the drop down list, like auto complete list fouud in IDEs.
#11
Does anyone knows the memory limit a midlet can use? We could perhaps store the search index in the memory.. Or maybe the RMS (my impression its limited to about 64k)..
#12
Opening Zipstream Once
Fri, May 11, 2007 at 12:45 AM
Quote
Hi Gert,

couple of days ago I managed to get DFM running using a zipped dictionary (I created ZipInputStreamAccess implemented using ZipInputStream extending DfMInputStreamAccess). Its advantage in this case is that the dictionary uses much less space on the phone. I noted is this implementation that when ever a csvFile, its calls the underlying InputStreamAccess.. Then ZipInputStreamAccess would try to seek through the file till its searches the file and open its stream.

Now the question, is there anyway you would know that could move back the inputstream - sort of a random access file, go back to start of zip file or reset the stream (stream.reset() doesn't work).
Otherwise is there a way to cache the files which are read out of the zip file? If not, each time I need to reopen the stream to the zipped file, another security promoted will appear.

Now I am looking at ReadManiac codes if they have a better implementation because when I trying their software, I see I could fast forward and backward a file without any file access warnings.

Joshua
Fri, May 11, 2007 at 1:03 AM

Quote
Looking thru ReadManiac code, seems they uses a File class

However http://developers.sun.com/techtopics/mobility/apis/ttips/fileconnection/ mentions this is a Optional Package..

How well do JSR-75 phones support this feature? com.sun.midp.io.j2me.storage.File

Quote
Hallo Joshua !



What, you already managed to (partly) access a zipped dictionary ? I thought that would be much more effort !



Well, that's the restriction, there is no random file access as far as I know. Right, a stream.reset() won't help. So the only way that I know to do a stream.seek(pos) (for positioning at byte number post) is to re-open the stream and do a stream.skip – and hope that the skip is implemented efficiently !! With the drawback of the security prompts as you write; well we'll need to get a certification anyway, I believe.



Caching is a good idea also for performance improvement ! For example the zip file's file table (where all the file names and their position is stored) might be a good candidate for caching. Also, the searchlist files are read for each translation and might be a good candidate for caching. In any case, I am not aware of any caching class that is provided in Java ME you would have to implement it yourself. I once tried to write a simple caching myself (I think I did put it in CsvFile.java), but I never really completed it.



Hope in the end your will find a way to get things work !



Besides: posting in the forum might help to get an advice from other people ...



Gert







Quote
> However http://developers.sun.com/techtopics/mobility/apis/ttips/fileconnection/ mentions this is a Optional Package..

Well, that is JSR 75 !!



> How well do JSR-75 phones support this feature? com.sun.midp.io.j2me.storage.File

What is com.sun.midp.io.j2me.storage.File ? Never heard about that.



Gert

#13
I working on Zipped Dictionaries support. Hopefully can be used for 3.2.

I would like to suggest that zip dictionary be loaded when selected, rather changed in settings and reset the app. Or rather, have a "load dictionary" as one of the main menu options.
#14
QuoteGood news. I've got the browser implemented and working.

My next step will be the file decompression. I already have some J2SE codes to compress to an archive- we could use it to extra from old jars and place them in new files.

My current implementation I working with is tar with zlib compression. We might be able to implement zip/jar support, but I sort of given up on it at the moment. Infact, tar with zlib gives greater compression, although my guess is its slower.
#15
yeah, i changed the encoding for me in WTK25\wtklib\Windows\ktools.properties