Naoki Tomita (Tomill) > Lingua-JA-Gal > Lingua::JA::Gal

Download:
Lingua-JA-Gal-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Lingua::JA::Gal - Leet speak by Japanese gals

SYNOPSIS ^

  use Lingua::JA::Gal;
  use utf8;
   
  $text = Lingua::JA::Gal->gal("こんにちは"); # "⊇w丨ニちレ£"
  $text = Lingua::JA::Gal->gal("こんにちは", { rate => 50 }); # "⊇ん(ニちは"

DESCRIPTION ^

Lingua::JA::Gal converts Japanese text into "ギャル文字" style. It's a writing style (like http://en.wikipedia.org/wiki/Leet) on the cellphone mail, made by Japanese teenage girls.

METHODS ^

gal( $text, [ \%options ] )
  Lingua::JA::Gal->gal("こんにちは");

\%options can take

rate

for converting rate. default is 100.

  Lingua::JA::Gal->gal($text, { rate => 100 }); # full(default)
  Lingua::JA::Gal->gal($text, { rate =>  50 }); # harf
  Lingua::JA::Gal->gal($text, { rate =>   0 }); # nothing
callback

if you want to do your own way.

  my $kanjionly = sub {
      my ($char, $suggestions, $options) = @_;
       
      if ($char =~ /p{Han}/) {
          return $suggestions->[ int(rand @$suggestions) ];
      } else {
          return $char;
      }
  };
  
  Lingua::JA::Gal->gal($text, { callback => $kanjionly }); # 漢字のみ

SEE ALSO ^

http://ja.wikipedia.org/wiki/%E3%82%AE%E3%83%A3%E3%83%AB%E6%96%87%E5%AD%97

http://coderepos.org/share/browser/lang/perl/Lingua-JA-Gal (repository)

AUTHOR ^

Naoki Tomita <tomita@cpan.org>

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: