Acme::Nyaa - Convert texts like which a cat is talking in Japanese
use Acme::Nyaa::Ja; my $kijitora = Acme::Nyaa::Ja->new(); # the following code is equivalent to the above. use Acme::Nyaa; my $kijitora = Acme::Nyaa->new( 'language' => 'ja' ); print $kijitora->cat( \'猫がかわいい。' ); # => 猫がかわいいニャー。 print $kijitora->neko( \'神と和解せよ' ); # => ネコと和解せよ
Acme::Nyaa is a converter which translate Japanese texts to texts like which a cat talking. Language modules are available only Japanese (Acme::Nyaa::Ja) for now.
new() is a constructor of Acme::Nyaa::Ja
my $kijitora = Acme::Nyaa::Ja->new(); my $sabatora = Acme::Nyaa->new( 'language' => 'ja' );
cat() is a converter that appends string ニャー at the end of each sentence.
ニャー
my $kijitora = Acme::Nyaa::Ja->new; my $nekotext = '猫がかわいい。'; print $kijitora->cat( \$nekotext ); # 猫がかわいいニャーー!!
neko() is a converter that replace a noun with ネコ.
ネコ
my $kijitora = Acme::Nyaa::Ja->new; my $nekotext = '人の道も行いも神は見ている'; print $kijitora->neko( \$nekotext ); # 人の道も行いもネコは見ている
nyaa() returns string: ニャー.
my $kijitora = Acme::Nyaa->new; print $kijitora->nyaa(); # ニャー print $kijitora->nyaa('京都'); # 京都にゃー
straycat() converts multi-lined sentences. If 2nd argument is given then this method also replace each noun with ネコ.
my $nekoobject = Acme::Nyaa::Ja->new; my $filehandle = IO::File->new( 't/a-part-of-i-am-a-cat.ja.txt', 'r' ); my @nekobuffer = <$filehandle>; print $nekoobject->straycat( \@nekobuffer ); # 吾輩は猫であるニャ。名前はまだ無いニャーー! # どこで生まれたか頓と見當がつかぬニャーん。何ても暗薄いじめじめした所でニャーニャー泣いて # 居た事丈は記憶して居るニャーん。吾輩はこゝで始めて人間といふものを見たニャーん。然もあとで聞くと # それは書生といふ人間で一番獰惡な種族であつたさうだニャーーー!! 此書生といふのは時々我々を捕 # へて煮て食ふといふ話であるニャ〜。
azumakuniyuki <perl.org [at] azumakuniyuki.org>
Acme::Nyaa
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Acme::Nyaa, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Nyaa
CPAN shell
perl -MCPAN -e shell install Acme::Nyaa
For more information on module installation, please visit the detailed CPAN module installation guide.