<$BlogRSDURL$>
What's up タディちゃん
    the Todd Rudick/Rikai.com blog
12/29/2004
  Rikai-like Firefox plugin
(note: this article is out of date. Please see http://rikaixul.mozdev.org/installation.html for the latest version)


For firefox users, I've integrated the new popup code with my abandoned rikaixul project, and voila--popups on any web-page (intranet, etc.) without having to use rikai. See my post here
 
12/28/2004
  Back to the old method
Until I can do more testing the old method of parsing Japanese is back.
 
12/27/2004
  I've GPLed the javascript that runs the new Rikai
If anyone wants to help, either to make it better, get Opera/Safari support working, etc. please dig in.

Also, the popup code could easily be modified to work as a firefox plugin. I already have code to do the Japanese lookup in my rikaixul plugin, so it should just be a matter of connecting everything together. Still, it's not a good first firefox project, as developing plugins can get pretty hairy.
 
12/25/2004
  Changed the keys for lookups
I was alerted to the fact one can't capture the shift or capslock on MAC firefox. So now it uses l or c (see above). The shift/capslock keys still work though.
 
12/24/2004
  A bit more detail on the new method for Japanese
... which is still just on the front page and text-results. External web-pages work, also with a new method, but I'll hold off a bit on that until I get more feedback.

Here's a summary of the differences:

Old method: I take html, parse it, segment (separate into words) the Japanese based on a complex algorithm, and place code for popups before returning it.

New method: I only add a little Javascript to the page. Then your browser parses the document little by little as you move the mouse around. When you go over a Japanese character, I grab the next 10 characters and send a message back to Rikai. Rikai returns the text definition which is placed into the popup.

Pros:
1 - The pages are tiny, and so I don't need to do any compression. Rikai has litle work to do and should respond much faster. People who can't use http compression can use the site again.
2 - I can afford to allow matching from any character, kana or kanji. So I leave it to you to parse the document, which generally you can do better anyway, plus it should be better for learning.
3 - I can afford much fancier popups, since the issue isn't bandwidth anymore but latency.
4 - Rikai becomes some neat javascript and a very simple script to return definitions. It should be very simple to clean up and distribute. Also I hope this can easily be turned into a mozilla plugin.
5 - As a side effect, I fixed some positioning and coloring bugs in Firefox. They're browser bugs actually, but I finally know what and worked around them. E.g., wikipedia finally looks right (though you can't see it yet).
6 - Better methods of managing wordlists, etc, using the keyboard. The old double-clicking thing still works though.
7 - I can show popups for most javascript generated content.

Cons:
1 - When you run your mouse over a character, you don't yet have the definition. There may be a short delay while you grab it from Rikai. So far it seems very fast.
2 - I'm unsure of the effect of having many many tiny requests. Hence I'm trying a different model where you have to hold down the "shift" key to see readings. One person didn't like this--I think it may be better for learners anyway, actually, since you're discouraged from looking up things you don't need. But maybe I'm rationalizing. Anyway, I plan to add a caps-lock binding to make it always-on. Please let me know what you think.
3 - The initial javascript is kinda slow in Internet Explorer.
4 - There's very little chance it'll work on browsers I don't have access to or don't otherwise care about. Right now I care about IE and Firefox. The old method works on Opera, Netscape 4.7, Safari (I hear), that KDE thingy, etc. On the other hand, hopefully others can fix the Javascript if they want support. IE on the mac, as always, is probably a lost cause.
5 - I guess I'm mostly playing--it's a huge change without much new functionality.
 
12/20/2004
  New method elevated to front-page
I turned the new javascript on on the front-page. Text you type in or any URLs you go to still uses the old code.

Pagesize is much smaller, so I can turn off compression. Plus, I don't need to parse the document on my side to add callbacks--that all happens on your end. Of course, I could have done some combination like send the definitions but have the other markup done on the client... Hmmm...

Double-clicking to add a word to the wordlist doesn't work currently. It's easy to add though, so expect that soon.

Do you like this? (does it make any difference?)

cheers,
Todd
 
12/19/2004
  New way of doing Rikai in the works
Inspired by google's neat javascript input completion code used in google suggest, I wrote a new version of the popup parsing code.

This could have huge advantages if it works out--first of all, I will be able to have popups for hiragana. The page sizes will be tiny, containing no additional markup. I don't need to segment Japanese, I let you do it by where you point the mouse. One disadvantage is the pages wouldn't work offline anymore--a quick call to rikai happens whenever you Mouseover a japanese character. Despite the massive number of callbacks this would create, I think overall it'd be less load for the server than parsing, exploding, and compressing the whole document the way I do.

Anyway, click the example above, and let me know what you think. It works in IE and Mozilla, I'm going to give up on Netscape 4, but I don't know if it works on other browsers.
 
12/16/2004
  New Sections
I've converted the KDIC/PalmOS tools section to a blog, so people can comment (and because the amount of stuff is getting unwieldy).
Also, I've added a new Programming Tools page. For now, I'm simply posting all the stuff I've done in the past, but I plan to use it in the future as a public home for the little scripts and tools I use daily for programming and/or studying.

 
12/14/2004
  A couple of things in the works
1 - A programming topic: I'm sick of looking up kanji codes (generally to see where kana is, etc.). So I whipped up a couple of simple kanji tables. EUC & Shift-JIS.
2 - This site has quite a few English speakers trying to learn Japanese, and a lot of Japanese trying to learn English too. Rikai's a pretty advanced level site in both cases, so people are generally serious. But would people be interested in meeting some of their counterparts? Let me know your thoughts...
 




































One man's $0.02. A diary of updates in the life and work of Todd Rudick, creator of Rikai.com.

ARCHIVES
05/2004 / 06/2004 / 09/2004 / 10/2004 / 11/2004 / 12/2004 / 05/2005 / 11/2005 / 05/2007 / 08/2009 / 01/2010 / 04/2011 / 05/2011 /

Co-Conspirators:

  • Renfield

    Powered by Blogger