Acme::Nyaa - Convert texts like which a cat is talking in Japanese
use Acme::Nyaa; my $kijitora = Acme::Nyaa->new; 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.
Nyaa is ニャー, Cats living in Japan meows nyaa.
ニャー
nyaa
new() is a constructor of Acme::Nyaa
my $kijitora = Acme::Nyaa->new();
cat() is a converter that appends string ニャー at the end of each sentence.
my $kijitora = Acme::Nyaa->new; my $nekotext = '猫がかわいい。'; print $kijitora->cat( \$nekotext ); # 猫がかわいいニャー。
neko() is a converter that replace a noun with ネコ.
ネコ
my $kijitora = Acme::Nyaa->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->new; my $filehandle = IO::File->new( 't/a-part-of-i-am-a-cat.ja.txt', 'r' ); my @nekobuffer = <$filehandle>; print $nekoobject->straycat( \@nekobuffer ); # 吾輩は猫であるニャん。名前はまだ無いニャー。 # どこで生まれたか頓と見當がつかぬニャーー! 何ても暗薄いじめじめした所でニャーニャー泣いて # 居た事丈は記憶して居るニャーん。吾輩はこゝで始めて人間といふものを見たニャーーーー! 然もあとで聞くと # それは書生といふ人間で一番獰惡な種族であつたさうだニャん。此書生といふのは時々我々を捕 # へて煮て食ふといふ話であるニャー!
nyaaproxy is a sample application based on Plack using Acme::Nyaa. Start nyaaproxy by plackup command like the following and open URL such as http://127.0.0.1:2222/http://ja.wikipedia.org/wiki/ネコ.
http://127.0.0.1:2222/http://ja.wikipedia.org/wiki/ネコ
$ plackup -o 127.0.0.1 -p 2222 -a eg/nyaaproxy.psgi
https://github.com/azumakuniyuki/p5-Acme-Nyaa
% sudo cpanm Module::Install % cd /usr/local/src % git clone git://github.com/azumakuniyuki/p5-Acme-Nyaa.git % cd ./p5-Acme-Nyaa % perl Makefile.PL && make && make test && sudo make install
azumakuniyuki <perl.org [at] azumakuniyuki.org>
Acme::Nyaa::Ja - Japanese module for 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.