Guest KonstaT Posted May 22, 2012 Report Posted May 22, 2012 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 May 22, 2012 Report Posted May 22, 2012 (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 May 22, 2012 by shmizan
Guest KonstaT Posted May 22, 2012 Report Posted May 22, 2012 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 May 22, 2012 Report Posted May 22, 2012 (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 May 22, 2012 by shmizan
Guest leripe Posted June 19, 2012 Report Posted June 19, 2012 (edited) Any chance to add swedish dictionary for gb too? I would like to have both finnish and swedish. Edited June 19, 2012 by leripe
Guest mustek Posted June 10, 2014 Report Posted June 10, 2014 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?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now