lovell/hepburn — pull request #2 by jeresig (2013-09-03 15:11:06+00:00)
Title: Add toHiragana Method, standardize on EDICT Hepburn/Romaji conventions

Lovell -

Love your Hepburn module, thank you so much for making it! I've been using it a bunch, especially in: https://github.com/jeresig/node-romaji-name

I've made a number of changes, listed below. Please let me know if you have any questions!

Changes:

* Added a new `toHiragana` method which converts the romaji string into a hiragana string.
* Standardize on the conventions in EDICT/ENAMDICT.
* Brought in ~500 romaji/hiragana name pairs from ENAMDICT to test against.
* `.gitignore` only needs `node_modules`, the rest isn't needed (at least not yet).
* Use `bulk-replace` module to simplify some of the replacements being done.

The standardization on EDICT/ENAMDICT is what will cause the biggest problems - they're backwards incompatible (although what was being output before was, debatably, ambiguous). The changes:

* `M` before a non-vowel is now `N` instead.
* Ambiguous usage of `N` before a vowel is now `N'`.
* Long vowels (oo/ou/aa/ee/ii/uu) are no longer removed, as that creates an ambiguous result.
* WI/WE/WO vs. I/E/O and DJI/DZU vs. JI/ZU. In these cases I standardized on the output that's in EDICT/ENAMDICT - they use the (probably less used) WI/WE/WO/DJI/DZU as it's, at least, not ambiguous.