Hello!
I can`t compile the last version of DFM_empty (J2ME). There are not enough classes in the folder "dictionarymid-code-r787-trunk\JavaME" on https://sourceforge.net/p/dictionarymid/code/HEAD/tree/. Adding missing classes from folder "dictionarymid-code-r787-trunk\DictionaryForMIDs" I still can't compile them. Do you have a ready-made source assembly for DictionaryForMIDs_3.5.8_empty?
Thank you in advance!
Dear TopDict,
I am glad to know that you are interested in DictionaryForMIDs and compiling it.
Here some information: the JavaME part is the HMI (user interface) for Java ME devices. There is some overview on this concept at the diagram at http://dictionarymid.sourceforge.net/development.html (http://dictionarymid.sourceforge.net/development.html).
For compiling, the classes from the translation layer are needed too.
http://dictionarymid.sourceforge.net/development.html#Source (http://dictionarymid.sourceforge.net/development.html#Source) gives a description for building (compiling) the whole thing.
Does this help? Well just keep asking!
With best regards,
Gert
Thank you!
I have compiled jar file, but it doesn`t want to start. :'(
Could you provide some details please? For example, on which device did you install the jar file? Is there an error message?
Gert
I will try to compile the jar file with build.xml. I will inform you about the results. Thanks!
All succeeded! I've already tested it. I'm delighted, thanks a lot!
I created my own dictionary for 20000 words. It works well in the jar archive, but when opened in the empty program from SDcard an error appears ""java.lang.OutOfMemoryError/null".
In jad file I wrote loglevel: 3 and the result is:
searchfile open:
....
indexfile open:
....
Instead of a phrase "read-parse file-line and dictionaryfile open" an error appears ""java.lang.OutOfMemoryError/null".
I reduced the dictionary to few words with short definitions, but the error remained. My cellphone is Samsung (2008).
What could be the problem?
I am glad to read that you made such good progress :) :)
QuoteI created my own dictionary for 20000 words.
If I may know, what dictionary is it? Maybe it is of public interest and something that you would like to release to the public?
QuoteIt works well in the jar archive
That's when you installed it on your Samsung device?
Quotebut when opened in the empty program from SDcard an error appears ""java.lang.OutOfMemoryError/null".
Also on your Samsung device? What is the difference to "It works well in the jar archive" before?
QuoteMy cellphone is Samsung (2008).
Could you please give some technical details (device, RAM).
With best regards,
Gert
Hello!
I took a part of one of the dictionaries from your site for testing, generated a dictionary with 20000 words (MyDict/dictionary/) and then created a jar/jad file.
Then I installed on my phone DictionaryForMIDs_empty.jad and chose in Dictionary path: file:///tflash/MyDict. There was an error "java.lang.OutOfMemoryError/null".
But then I chose in Dictionary path: file:///tflash//MyDict/DfM_Test_EngDef_3.5.9/DfM_Test_EngDef_3.5.9.jar and this error disappeared. Wonders never cease!
There is one problem left: when I enter "a" (incremental search and * character at end) I only get words starting with "a" (for example, apple) but not starting with "A" (Apollo).
Is the case-insensitive translate provided in version 3.5.9?
I changed one line of code and the problem is solved. Sorry to bother you!
I am glad that you make progress.
Don't worry, you do not bother, in the contrary! Just that sometimes I am not able to reply right away.
About case insensitiveness, this is handled by the Normation classes, see here: http://dictionarymid.sourceforge.net/DfM-Creator/newdictNormationLang.html
Besides, previously I made a posting where I asked, for example, about your cell phone model.
With best regards,
Gert
Sorry for the long absence!
My phone is Samsung E740. When reading a dictionary from a memory card the OutOfMemory error occures. Attach screenshots.
Another question: my keys 1 (move selection forward) and 3 (move selection back) don't work. Should they work?
Those screenshots are enormously helpful:
- At the beginning there is approx. 3 MB free memory
- The number of free bytes slightly decreases after opening/reading/parsing searchfile and indexfile number 30
- Opening and reading the directory file number 364 still works
- Then there is a memory error when parsing the translation result of directory file number 364
Can you tell me the size of file directory364.csv?
In DictionaryForMIDs.properties, what is the value of dictionaryFileMaxSize?
Best regards,
Gert
Thanks!
The size of file directory364.csv is 6 432 bytes.
dictionaryFileMaxSize=71564
Thanks for that information; this looks good.
Are there also cases when the translation works, without OutOfMemoryError?
Gert
I have tried to translate about 30 different words, unfortunately the result is the same (OutOfMemoryError).
Strange! From the logging output everything seems to be normal. Until that memory error occurs.
Did you try to install any other dictionary on your device? Just any simple, small dictionary, to test if that has the same problem?
Besides, can you test your dictionary with the PC versoin (http://dictionarymid.sourceforge.net/pc.html (http://dictionarymid.sourceforge.net/pc.html))?
Best regards,
Gert
1. I tried loading from a memory card small dictionary DictionaryForMIDs_3.5.7_Elements. Indeed, it works without errors. See screenshots.
2. Then I created two small dictionaries containing Russian characters (English-Russian and Russian-Russian). Here they are:
actinium актиний
americium америций
arsenic мышьяк
hafnium гафний
helium гелий
sodium натрий
titanium титан
#DictionaryForMIDs property file
#Sun Oct 25 08:05:19 MSK 2020
indexFileMaxSize=150
infoText=Test
language1IndexNumberOfSourceEntries=7
indexCharEncoding=UTF-8
dictionaryFileSeparationCharacter='\t'
dictionaryGenerationSeparatorCharacter='\t'
language1FilePostfix=ENG
dictionaryCharEncoding=UTF-8
dictionaryGenerationOmitParFromIndex=false
numberOfAvailableLanguages=2
language1IsSearchable=true
language2GenerateIndex=false
dictionaryFileMaxSize=654
language2FilePostfix=RUS
dictionaryAbbreviation=ENG
searchListFileMaxSize=31
language2IsSearchable=false
language1HasSeparateDictionaryFile=false
searchListCharEncoding=UTF-8
searchListFileSeparationCharacter='\t'
language1DisplayText=ENG
indexFileSeparationCharacter='\t'
language2HasSeparateDictionaryFile=false
dictionaryGenerationInputCharEncoding=UTF-8
language2DisplayText=RUS
language1GenerateIndex=true
актиний Радиоактивный элемент группы актинидов, представляющий собой продукт разложения урана.
америций Радиоактивный металл из группы трансурановых актиноидов.
мышьяк Ядовитый металл группы металлоидов.
гафний Тяжёлый тугоплавкий серебристо-белый ковкий металл.
гелий Инертный газ.
натрий Легкоплавкий щелочной металл.
титан Твердый, ковкий металл.
And again there was an error. See screenshots.
3. In Emulator on PC all dictionaries (both large and small) work without errors.
Thats excellent information in order to try to narrow down the problem!!
I just read the source code again. Do you know some Java?
The last successful log message is from CsvFileCache.java:
Util.getUtil().logTime("position file", startTime);
In DefaultFileStorageReader.java the following line is not reached:
Util.getUtil().logTime("read/parse file-line", startTime);
In between there is some simple code that reads character per character from the InputStream that belongs to directory1.csv.
Very strange!
Can you post the file directory1.csv? The English-Russian from your step 2.
Best regards,
Gert
I am not a programmer :'(.
Thanks!
I checked that file with a hex editor and it is perfectly ok!
Hmmmm, I don`t know what exactly is going wrong there with your device. The error occurs when the translation for "helium" is read from directory1.csv.
Probably asking Samsung for a bug fix on the E740 will not be successful :-\
Does any of these dictionaries work on your device? Or do these also show OutOfMemoryError?
http://dictionarymid.sourceforge.net/dictionaries/dictsOtherBilinguals.html#Russian (http://dictionarymid.sourceforge.net/dictionaries/dictsOtherBilinguals.html#Russian)
With best regards,
Gert
I tried the Muller English-Russian dictionary. Unfortunately, the OutOfMemoryError also appears.
Well, you provided excellent information!
From all that information I'd guess that there is a bug in the Java runtime implementation of your Samsung E740.
I really like those old JavaME devices! But ... maybe you have a chance to change to another model?
With best regards,
Gert
Thank you for your responsiveness and time spent!
Tomorrow I'll go outside and throw my device in the trash!
I wonder why my phone doesn't want to read the dictionary folder directly (file:///tflash/dictionary), but only through the jar archive.
When I choose a path file:///tflash/DfM_Test_EngRus_3.5.9/DfM_Test_EngRus_3.5.9.jar it works great (see screenshots).
I have one last question, if you'll excuse me:
in the file de.kugihan.dictionaryformids.hmi_java_me.lcdui_extension.stringcolouritem.java there are the following lines:
int keySelectForward = 51; //3 key- move selection back
int keySelectBack = 49; // 1 key - move selection forward
These keys do not work in the emulator.
Did I understand correctly that this function is not fully implemented?
QuoteWhen I choose a path file:///tflash/DfM_Test_EngRus_3.5.9/DfM_Test_EngRus_3.5.9.jar it works great (see screenshots).
So it does work on your cell phone??
QuoteI wonder why my phone doesn't want to read the dictionary folder directly (file:///tflash/dictionary), but only through the jar archive.
Does file:///tflash work (omit dictionary)?
Quotein the file de.kugihan.dictionaryformids.hmi_java_me.lcdui_extension.stringcolouritem.java there are the following lines:
int keySelectForward = 51; //3 key- move selection back
int keySelectBack = 49; // 1 key - move selection forward
These keys do not work in the emulator.
Did I understand correctly that this function is not fully implemented?
The implementation of class StringColourItem has always been a 'challenge'. See also https://dictionarymid.stefan1200.de/forum/index.php?topic=421.0 (https://dictionarymid.stefan1200.de/forum/index.php?topic=421.0)
What emulator are you using?
Best regards,
Gert