Jump to content

[APP/MOD] CM7 - LatinIME with Finnish layout and dictionary


Recommended Posts

Guest KonstaT
Posted

I actually haxed the makedict itself to output in correct format. ;) New version attached (rename .zip -> jar). It works in both directions and outputs in format that it can compile back again.

Diff:


--- a/tools/makedict/src/com/android/inputmethod/latin/XmlDictInputOutput.java
+++ b/tools/makedict/src/com/android/inputmethod/latin/XmlDictInputOutput.java
@@ -203,10 +203,10 @@ public class XmlDictInputOutput {
set.add(word);
}
// TODO: use an XMLSerializer if this gets big
- destination.write("<wordlist format=\"2\">\n");
+ destination.write("<wordlist>\n");
for (Word word : set) {
- destination.write(" <" + WORD_TAG + " " + WORD_ATTR + "=\"" + word.mWord + "\" "
- + FREQUENCY_ATTR + "=\"" + word.mFrequency + "\">");
+ destination.write(" <" + WORD_TAG + " "
+ + FREQUENCY_ATTR + "=\"" + word.mFrequency + "\">" + word.mWord + "");
if (null != word.mBigrams) {
destination.write("\n");
for (WeightedString bigram : word.mBigrams) {
[/CODE]

@shmizan

This new version works in both directions with the second wordlist you linked. I haven't tested the dictionary in device though.

Looking at that Croatian/Czech example, it looks like your problems might be very well related to Hebrew character encoding.

makedict.zip

Guest shmizan
Posted (edited)

the new version you posted outputs the words in a different order, yet maintains the f="value" of them (mixing words with the same f="value" so it's not like before), so I don't know if that's a reason the be concerned.

well it does "decompile" other LatinIME dict files (tried en and ru) but still not Hebrew (same error).

any reason the wordlist I linked, when built into dict file, will give me a force close?

also could you please put a short explenation of how making an ICS dict is different than making a GB dict?

Edited by shmizan
Guest KonstaT
Posted

Yeah, different order shouldn't make any difference, just as long they're balanced with the frequency value. It actually outputs them in alphabetical order, but maybe just not in Hebrew. ;)

I'm still sticking with my theory of character encoding. :P It's possible that it causes both of those problems, but difficult to say really.

Btw, I can also reproduce that Croatian/Czech problem with scandinavian letters. Words that start with letters that have umlauts (ä and ö) are not suggested as they should. There's definitely some underlying issue.

Guest shmizan
Posted (edited)

yeah ok.

the Hebrew keyboard crash on words predictions is not unique to the Blade and not even to CM9. it's ICS. I talked to Tom about it and he was able to reproduce it from latinime from android 4.0.4 r12. I should go to android project with this then.

thanks for your helpful posts! was nice trying it out

Edited by shmizan
  • 4 weeks later...
Guest leripe
Posted (edited)

Any chance to add swedish dictionary for gb too? I would like to have both finnish and swedish.

Edited by leripe
  • 1 year later...
Guest mustek
Posted

I can't compile makedict from AOSP source and this version of makedict doesn't work because the current LatinIME does not show the dictionary suggestions and not show any error.

 

Can anyone help me?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.