Acme-Samurai
view release on metacpan or search on metacpan
lib/Acme/Samurai.pm view on Meta::CPAN
}
}
}
if ($node->is('æåè©')) {
if ($node->next and
$node->next->pos !~ /è©/) {
$text = $node->extra if $node->extra;
$text .= 'ã§ããã';
}
}
$node->text($text);
}
sub finalize {
my ($self, $doc) = @_;
my $text = $doc->join('text');
$text =~ s/(?:ã¦ããã¾ãã|ã¦ãã¾ãã?)\b/ã¦ããå/g;
$text =~ s/(?:ã©ãã)?ãããããªã(?:ãããã¾(?:ãã|ã|ãã))?/ãããããªã/g;
$text;
}
1;
__END__
=encoding utf-8
=head1 NAME
Acme::Samurai - Speak like a Samurai
=head1 SYNOPSIS
use utf8;
use Acme::Samurai;
Acme::Samurai->gozaru("ç§ãä¾ã§ã"); # => "ãããããä¾ã§ããã"
=head1 DESCRIPTION
Translates Japanese to æä»£å
(L<http://en.wikipedia.org/wiki/Jidaigeki>) speak.
Test form: L<http://samurai.koneta.org/>
=head1 METHODS
=over 4
=item gozaru( $text )
=back
=head1 AUTHOR
Naoki Tomita E<lt>tomita@cpan.orgE<gt>
=head1 SPECIAL THANKS
kazina, this module started from ã¦ãããã¼ dictionary.
L<http://kazina.com/texter/index.html>
and Hiroko Nagashima, Shin Yamauchi for addition samurai vocabulary.
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=for stopwords hiroko nagashima shin yamauchi de gozaru kazina
=cut
( run in 3.023 seconds using v1.01-cache-2.11-cpan-f56aa216473 )