sm4tik

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

31 posts in this topic

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

1

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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

Edited by leripe
0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.