I work on Linux, and I use Emacs' "international" and "leim" packages to transliterate romaji to hiragana. I understand how I need to type "ha" when I want the particle "wa" ( ) and that I need to type "wo" when I want the direct-object-marker particle "o" ( ).

It is my understanding that "wa" is only rendered as when it's a particle, and that otherwise, it is rendered as . Likewise, I believe that "o" is only rendered as when it's a particle, and otherwise, it's rendered as . If that is correct (and someone please correct me if I'm wrong), then I want to enhance Emacs' romaji-to-hiragana transliteration as follows ...

I will enhance the Emacs software such that if either "wa" or "o" are typed with spaces surrounding them, it will replace them with and , respectively. Otherwise, I will make sure that the software will continue to replace them with and . I am in the habit of typing spaces between words, anyway, so this will not require me to change my typing style.

And the Emacs romaji-hiragana transliteration software already automatically gets rid of spaces between words when newline and certain other characters are typed, so the resulting text will still ultimately appear without inter-word spaces, as normal.

The reason I'm posting this here is because I want to know if anyone knows of any software which already distinguishes between particles and non-particles when transliterating "wa" and "o". If so, I'd prefer to use that software instead of making the effort to enhance Emacs.

But if such software doesn't already exist, I will continue to work on this project, and once I'm finished, I'll post my elisp code here.

I have a day job, and I will have to do this in my not-too-ample spare time, so please be patient when waiting for my results.

  • 7
    Why not type ha and wo like every single person in Japan does...? There are many other irregularities that exist in kana input using an English keyboard, like du and nn and xi, so it probably makes more sense to get used to it (because it’s at least one-to-one) as opposed to doing something context-dependent. Commented Oct 12, 2019 at 20:34

1 Answer 1


While this is definitely doable and it sounds like your approach will work I would strongly advise against it: if you get a habit of typing "wa" when you mean は and "o" when you mean を, you will have a very hard time whenever you have to use another software or someone else's computer. It may take a while to teach yourself to type "ha" and "wo" but it will mean much less trouble in the future.

BTW, を is very commonly transliterated as "wo" even when pronounced "o".

  • 2
    I accept your point and the point made by Darius Jahandarie, above, and I now see the value of getting into the habit of typing "ha" and "wo" when "wa" and "o" are used as particles. If millions of people in Japan do this regularly, I can do it also. :) Nonetheless, as a side project (more like a hobby), I'm still going to enhance Emacs in the way I describe here. If that software can recognize particles in this manner, maybe other software developers will realize that this methodology can be helpful, and perhaps they will also add this feature to their own software in the future.
    – HippoMan
    Commented Oct 14, 2019 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .