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

Topics - 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
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...!!!
#3
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
#4
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

#5
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.
#6
I got the InflaterInputStream with all its needed classes to compile, but Error preverifying class Inflater   1178008312428   7935... any ideas why?
#7
I couldn't compile so I had to made certain changes to de.kugihan.dictionaryformids.translation.normation

NormationGer.java
line 17
for (int charPos = 0; charPos < defaultNormatedWord.length(); ++charPos) {
         if (defaultNormatedWord.charAt(charPos) == '¤') { //removed Ã
            normatedWord.append("ae");
         }
         else if (defaultNormatedWord.charAt(charPos) == '¶') {
            normatedWord.append("oe");
         }
         else if (defaultNormatedWord.charAt(charPos) == '¼') {
            normatedWord.append("ue");
         }
         else if (defaultNormatedWord.charAt(charPos) == 'Ÿ') {
            normatedWord.append("ss");
         }
         else {
            normatedWord.append(defaultNormatedWord.charAt(charPos));
         }


NormationRus.java
line 17
char trongAm = '�'; // <--

Seems an invalid character is causing my editor not to save the file at all.
#8
I wrote this initially in an email to the developers. 'pasting here for interest of others.

QuoteDear Developers,

First of all, thanks for the great job and effort into this great software.

Although its UI wasn't impressive, the link to the webpage was extremely hard to find, I found the software very usefully and love it! IIRC, I came across this software when looking for a j2me English/Chinese translator (and I remembered using "translate" button to lookup meanings in the oxford dictionary).

As for now, my phone is now a Nokia 5300, a S40 3rd Edition, but unfortunately it has only a jar limit of 1MB. But thankfully, it supports microSD/transflash, so I'm really in favour of the development of JSR-75 filerecord implementation aka 'Loadable Dictionaries' for DictionaryForMids.

Well, I only have some basic knowledge on j2me programming, but hopefully I could be of some help in this project. Just an idea: its quite cool that a keyword looks up encyclopedia information too be implemented for DictionaryForMids. Its would like using http://answers.com which I love using too.

Anyway, just a short thank you note to you guys. Keep up the good work!

Happy 'coding,
Joshua Koo
Singapore
http://zz85.is.dreaming.org/