Help - Search - Members - Calendar
Full Version: Predictive Text Input Method For Superfast Typing
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
ShiroiKuma
I've tried to compile Prime for RC12. For those who do not know it's an input method for Japanese for uim.

However, though it was designed for Japanese it works with English.

Basically, after you type a word, you select it from a scrollable list of alternatives with the space-bar - there's alternatives in Japanese, but one is also in English.

Then later, when you start typing the word, it comes up as an option right after the first character.

It's very potent, and super on the zaurus, if you write a lot, after you have typed a couple of hundred words, it will remember your word selections and you mostly end up just typing first two letters of the word or so and then get offered the word you wanna type. Very good.

Now, Prime's homepage is at: http://taiyaki.org/prime/

Prime needs Ruby, which has been compiled for pdaXrom, it's at: http://www.pdaxrom.org/unstable/ruby_1.8.2_armv5tel.ipk

Then it needs suikyo, sary, and sary bindings for ruby.

I've compiled Prime, prime-dict, suikyo, and sary.

I'm including the sary ipk with this post.

Now the only thing missing to compile is sary's ruby bindings which is a 9k file, you can get it here: http://sary.sourceforge.net/sary-ruby-1.2.0.tar.gz

But it's not compiled by the regular configure, make, make install way. Instead the Makefile is generated by Ruby. So you untar it, run "ruby extconf.rb" and then you can do make etc...

For this you first need to install ruby and sary.

But I can't get this "ruby extconf.rb" to work, I get an error saying:
CODE
checking for sary.h... no

But sary.h is in /usr/local/include/ that's where it's installed when you install sary.

So I'm guessing it's some ruby or sary config setup, but can't figure out how to fix this.

Can someone try and find out how to do it. It's just the last little step and we'll have this fenomenal way to input text predictively, super fast under pdaXrom.
pgas
QUOTE
But I can't get this "ruby extconf.rb" to work, I get an error saying:
CODE
checking for sary.h... no

But sary.h is in /usr/local/include/ that's where it's installed when you install sary.


I don't know why ruby can't find the header as everything seems ok.
so I edit extconf.rb to comment out the test if header etc...
and run:
CODE
CFLAGS=`pkg-config sary --cflags` LDFLAGS=`pkg-config sary --libs` /usr/bin/ruby extconf.rb


I added the CFLAGS and LDFLAGS variables just in case and it creates the Makefile.

I then edited the Makefile to remove the amrv5tel... etc prefix before gcc.

Run make and voila attached is the result of make install.

Notes:
- If you are going to make ipk you can make 2 ipks for the lib one for development which is like the one you have posted here, and one without the .a include header etc, containing only the .so libs (you can strip the libs using "strip libxx.so.10.0.0" to decrease their sizes) for those who just want to use it.

- I tried first with ruby 1.8.3 that can be found here, but the headers are missing from the ipk.
ShiroiKuma
QUOTE(pgas @ Nov 22 2005, 09:49 AM)
- I tried first with ruby 1.8.3 that can be found here, but the headers are missing from the ipk.
*

Did you then recompile Ruby?

I think I'm using the same version and there seem to be some problems: downloaded your sary-ruby, made an ipkg. Then installed everything for Prime.

Now when you start uim-xim, it says it selects prime. Then I start uim-toolbar-gtk-systray. No prob.

Then when you launch a GTK application to write, you get error messages in the console, saying a required Ruby module socket not found, then some more...

The systray icon for uim-xim switches to Prime, so something is working, but obviously no output - due to Ruby errors.

Am compiling Ruby 1.4preview now, don't know how long it's gonna take on the Z. If it doesn't work after this I'll report what's wrong...
pgas
QUOTE
Did you then recompile Ruby?


No, I used http://www.pdaxrom.org/unstable/ruby_1.8.2_armv5tel.ipk
ShiroiKuma
QUOTE(pgas @ Nov 22 2005, 10:39 AM)
QUOTE
Did you then recompile Ruby?


No, I used http://www.pdaxrom.org/unstable/ruby_1.8.2_armv5tel.ipk
*


Hmmm, this is the one I just tried, it gives the errors. Not sure if it's Ruby related or Prime related, but the modules are not Prime's. Then later it goes on to complain some Ruby Prime modules are missing... Well, hopefully this Ruby native compilation will go fine, so far no errors, has been running for cca 20 minutes. and maybe then it'll move. smile.gif
ShiroiKuma
Oh man, a nightmare...

What I did, I installed the 1.8.3 Ruby without headers and with it I did get Prime working, could write and everything.

But then did some library stripping like you mentioned and had to reflash because I wanted to install a couple of packages cleanly.

Now can't get the stuff to move. Built all the ipks. Can install them no probs.

Then when I start uim-xim and run anthy the input works, when you switch to prime, uim says "backtrace" which means error in uim lingo and says no such file or directory. This is related to where prime, sary and so on files and directories lay, I had to do some symlinking before since it was looking for the files in the wrong locations and it worked. But I have the symlinks now and no luck...

Man...

Will try to compily Ruby 1.8.4 preview - which bombed in the meantime, to see if this'll work...

Any other suggestions?
jcabrer
When I began packaging ipks for pdaXrom, I left --prefix at the default which is /usr/local for most packages. Quickly I found that certain packages could/would not find includes and libs unless --prefix=/usr, so now I build everything with:
./configure --prefix=/usr && make && make prefix=/ipks/pkg_nm/usr install

It solves most headaches.
ShiroiKuma
QUOTE(jcabrer @ Nov 23 2005, 12:47 AM)
When I began packaging ipks for pdaXrom, I left --prefix at the default which is /usr/local for most packages.  Quickly I found that certain packages could/would not find includes and libs unless --prefix=/usr, so now I build everything with:
./configure --prefix=/usr && make && make prefix=/ipks/pkg_nm/usr install
*

It was sorta what you were saying but actually reverse, the files compile to /usr/ but uim looks for most stuff in /usr/local/ so it kept bombing out. The problem with debugging uim is that it gives you no clear error messages, it just says "backtrace..." for any error encounters, talk about helpful...

Anyhow, for anyone that is interested, I've compiled it and gotten it to work. So this is what you need to do to get PRIME working on your Z.

1. From the RC12 feed for SL-C860 install first package orbit2 and then package gconf. If your Z model is another, select the RC12 feed appropriately.
2. From the Japanese pdaXrom feed install uim.
3. Install Ruby 1.8.3, I've compiled it, it's available here.
4. Install the following packages:
prime-dict_1.0.0_armv5tel.ipk
prime_1.0.0.1_armv5tel.ipk
ruby-progressbar_0.9-1_armv5tel.ipk
sary-ruby_1.2.0_armv5tel.ipk
sary_1.2.0_armv5tel.ipk
suikyo_2.1.0_armv5tel.ipk
uim-prime_0.9.4_armv5tel.ipk
5. edit ~/.xinitrc or if you're using xfce4 edit ~/xinitrc.xfce4 and add somewhere at the beginning the following two lines:
CODE
export XMODIFIERS=@im=uim
export GTK_IM_MODULE=uim-prime

6. Restart X.

And that's it, now PRIME will work.

When you switch to a GTK application for text entry (you can try Leafpad, a very good UTF-8 editor) press Shift+Space and you can enter text predictively. Just type along, start typing a word and the options will pop up.

Don't be scared at first, if you're not used to Japanese, and if you don't have Japanese fonts installed, the first options will probably be rubbish, because they'll be Japanese, but then automatically PRIME when you start typing the word beginning with the same letters automatically suggests as first your most used option.

Basically it takes just tens or a couple hundred of words of your usual text and you'll get all the right option, after then it's just a matter of typing the first letter, or a couple of letters from a word, selecting the right one with space and entering it with enter. It becomes very fast on the Zaurus, I don't type texts in any other way using the small keyboard.

Enjoy. smile.gif
stuffman
Somewhat OT, but there's a great multi-lingual predictive text-input program called Dasher, which I built on my Z a few weeks ago (but I kinda forgot to save it when I upgraded to RC12 and I can't remember everything I had to do to build it). Basically, there is no keyboard use at all- everything is input throught the stylus. Characters are on the right side of the screen, and by moving your stylus towards the character causes them to "fly" towards you. Basically you "steer" your way through the characters, and the most likely ones will appear larger for easier input. It's sort of hard to explain without seeing it in action, but I think it's really nifty. I can leave my Z in portrait mode and enter text without having to open everything back up.

You can check out their website at http://www.inference.phy.cam.ac.uk/dasher/
ShiroiKuma
QUOTE(stuffman @ Dec 2 2005, 08:11 AM)
Somewhat OT, but there's a great multi-lingual predictive text-input program called Dasher, which I built on my Z a few weeks ago (but I kinda forgot to save it when I upgraded to RC12 and I can't remember everything I had to do to build it).

Can you post the ipk?
stuffman
I wish I still had it because it was fun to mess around with, but the .ipk and everything else got erased when I upgraded to RC12. If I have some time this week, I'll try to build it, but I can't make any promises... it's finals week sad.gif
scoutme
dasher is more funny than fast to me... it's an alternative, anyway
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.