[MOD][JB] Mini LatinIME

bill.weckel

Well-known member
Mar 23, 2012
172
33
0
This thread intended for devices with limited system memory such as LG Optimus One Family devices ( P500, P505, P506, P509 ). This mod is to assist in shrinking in the overall size of the /system partition to allow for the installation of Google Apps.

I should note that I am not creating the dictionaries. I am simply placing one dictionary from each predefined dictionary into a LatinIME.apk that has English also. Please don't ask me to create a dictionary for your language if it isn't already defined, as I cannot make them. I'm only doing this to lend a hand to those who don't know how.

If your language isn't listed below, then either I haven't made an apk for it yet or your language isn't supported.


[ Simple Downloads ]

Brazilian?( pt_br ) - Download
Czech - Download
Danish - Download
Dutch - Download
English - Download
French - Download
German - Download
Italian - Download
Portuguese( pt_pt ) - Download
Russian - Download
Spanish - Download

[ Advanced Download ]
Here's a link to my MediaFire folder with all of the mini LatinIME's. Go here
 
Please don't ask me to create a dictionary for your language if it isn't already defined, as I cannot make them. I'm only doing this to lend a hand to those who don't know how.

If your language isn't listed below, then either I haven't made an apk for it yet or your language isn't supported.


Hi Bill

I'm struggling since months, trying to build the world's first swissgerman dictionary for ICS/JB LatinImeGoogle.apk from scratch.

I've posted to every single XDA thread about that topic (from which all are outdated and/or nobody's answering).

I've managed to do anything necessary to build:
  1. Create my own swissgerman text corpus with more than 20'000 words (there is no swissgerman text corpus available)
  2. Clean that corpus from errors, mistakes, different versions of a similar word etc.
  3. Generate the weighted dictionary XML file
  4. Manually added common city names, street names, first- and last names, websites etc.

Now the part where I struggle:
From that XML we need to generate the binary dictionary file "main.dict". For that purpose there is a "makedict.jar" inside the source of older versions of "Softkeyboard" from Google.

But it seems, that from build to build (2.x 4.0, 4.1) the binary dictionary specification is a little different. I have a makedict.jar from 2.x which produces an invalid "main.dict" which can't be used in the 4.0 LatinImeGoogle.apk :(

I can't find a more recent version of makedict.jar and I tried to build it form the Android 4.1.1 sourcecode, which failed.

Long story short:
I can provide all files, but I would appreciate your help just to generate the main.dict, so you could create an additional LatinIme.apk with Swissgerman, which would be the world's first genuine Swissgerman Keyboard.

Background info about swissgerman:
It's not considered an official language in Switzerland, but the case is EVERYBODY uses swissgerman on smartphones, text messages, talking etc. But in official documents Switzerland uses the German language to write. So 90% of the time Swiss citizens are writing in swissgerman dialect. A problem with it's unofficial status is, there is no official style or correct way to write. Everybody writes just "as it sounds like", so for the same word some people uses different versions. "oktober" which means the month october can be written like "okktobr" "oktobr" "oktoober" etc. So I tried to build a big word-corpus from all my saved conversations which consists 20'000 words. I hope this corpus will mainly contains most used word styles. Another problem is: every part of Switzerland has very strong differencies in their dialect. So my "swissgerman" is very very different from a guy from north or south. It's far more different than british english / us english.
We categorize every dialect of Switzerland to it's geographical occurence. As we have 26 cantons (cantons are similar to States in the US) we have 26 dialects. Every canton has a two letter identification. The canton where the capital city is, is called BERN (BE), another big canton is ZURICH (ZH). So I'm coming from BE, so my dialect is called BE. Someone from ZH has a "ZH dialect". Easy, right?

British and US english are both english versions, so my BE dialect is a version of German.
British english is mostly written like that: EN_GB and us english: EN_US --> [language]_[country]

As we have one layer more we should call a BE dialect dictionary: DE_CH_BE

DE: "Deutsch" is the german word for "german"
CH: "Confederatio Helvetica" is the official name of Switzerland
BE: Is the dialect spoken in the canton of Bern

The main reason why I should not provide one dictionary for all Swiss citizen is clear: someone from ZH (canton of Zurich) would write the same words very different and would hate the automatic correction after 5min)

Process Explained:
acvrr6.png

The Swissgerman BE dialect XML: DE_CH_BE
Some posts where I tried to get help in the past: modaco | xda1 | xda2
 
Last edited:
I would love to help but im not creating any of the dictionaries. Someone else made a mini LatinIME for english. Im simply editing it by adding an additional language, cut and paste stuff. Im not a java programmer, tho i have dabbled with it. My skillset is Windows programming.

Sent from my LG-P506 using Android Central Forums
 
Wow. Thanks for the fast reply.
I'm a SharePoint / C# dev too. I'm also just trying to copy/paste that stuff :-)
So you can't help me figure out where the .dict file should go to in the Jelly Bean LatinIme? :-(
 
Wow. Thanks for the fast reply.
I'm a SharePoint / C# dev too. I'm also just trying to copy/paste that stuff :-)
So you can't help me figure out where the .dict file should go to in the Jelly Bean LatinIme? :-(

That's simple. The dictionaries go in the "res/raw/" folder inside the LatinIME.apk.

I'm a little more old school as for programming goes. I program in C.
 
That's simple. The dictionaries go in the "res/raw/" folder inside the LatinIME.apk.

I'm a little more old school as for programming goes. I program in C.

Yeah but I still can't figure out where to download a compiled version of DictionaryMaker.java from the android source, because that would compile a makedict.jar which can generate the binary-dictionary from the XML.

The only way it worked, was when I used a project called "AnysoftKeyboard" which is opensource, there is a compiled version of makedict.jar. But the ouput of it is not compatible to the recent ICS/JB binary-dict format. So I need to get a compiled version of the latest DictionaryMaker.java. I managed to compile it with compilr.com and download the compiled makedict.jar. Executing this one in a console on windows, using

C:\makedict\>java -jar makedict.jar

Throws a Java error about the MANIFEST.MF which doesn't contain the right description for "in what class does the main Method lies in?". After reading the Java documentation about the MANIFEST, I figured out it's easy, just adding

Main-Class: com.android.inputmethod.latin.makedict.DictionaryMaker

But it's not working: java.lang.NoClassDefFoundError

I just need a compiled version of that makedict.jar from Jelly Bean. Nothing else :)
 
I downloaded the relevant language to my sd but my only question is how to apply it to my phone. Should I just copy it over the current LatinIME in mu system/apps or am I missing something? Thank you for your time.
 
You can push it to /system/app with adb or copy it to sdcard and then use a file browser like Es File Explorer to install it. Either way, the original will get over written. Copying normally doesn't work.
 
The only reason I ask is because when I use ES File Explorer it says problem parsing packag. I'm using CM7 on an lg p505
 
Sorry for the slow reply. I'm not getting notifications like I should. Which language are you using? Let me know and I will see if I can make a CWM flashable zip.