Lingua::JA::Romanize::Kana::Hepburn - Hepburn Romanization using Japanese passport rules
use Lingua::JA::Romanize::Kana::Hepburn; my $conv = Lingua::JA::Romanize::Kana::Hepburn->new(); my $roman = $conv->char( $kana ); printf( "<ruby><rb>%s</rb><rt>%s</rt></ruby>", $kana, $roman ); my @array = $conv->string( $string ); foreach my $pair ( @array ) { my( $raw, $ruby ) = @$pair; if ( defined $ruby ) { printf( "<ruby><rb>%s</rb><rt>%s</rt></ruby>", $raw, $ruby ); } else { print $raw; } }
This is a Hepburn romanization version of Lingua::JA::Romanize::Kana module. This requires Lingua::JA::Hepburn::Passport.
This treats utf8 flag transparently.
Copyright (c) 2006-2008 Yusuke Kawasaki. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Lingua::JA::Romanize::Japanese, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::JA::Romanize::Japanese
CPAN shell
perl -MCPAN -e shell install Lingua::JA::Romanize::Japanese
For more information on module installation, please visit the detailed CPAN module installation guide.