Lingua::JA::Romaji::Valid splits a given word into pieces, but some of the filters should be applied before splitting.
creates an object.
an apostrophe between "n" and vowels is important if you want to know if the "n" is a syllabic "n" or the first part of a kana. However, it doesn't matter if the phrase is valid romanization or not. This filter cuts off the apostrophes between "n" and vowels to make validation easier.
cuts off the hyphen between "n" and vowels.
Long "o" may be exprssed by "oh" in passport Hepburn (and vulgar romanizations). This filter cuts off the "h"s following "o". This might be wrong assumption in some cases (eg. the "h" in O-hira, one of the late prime ministers, should not be cut off), but anyway it doesn't affect the result.
cuts off the "h"s following vowels.
cuts off the underscores, hyphens or circumflexes following vowels to denote they are long.
Ordinary Japanese names don't start with syllabic "n".
Ordinary Japanese names don't start with a particle "wo".
Kenichi Ishigaki, <ishigaki at cpan.org>
Copyright (C) 2007 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.