App-Lingua-BO-Wylie-Transliteration

 view release on metacpan or  search on metacpan

bin/wylie-transliterate  view on Meta::CPAN

use FindBin;

use lib "$FindBin::Bin/../lib";
use lib "$FindBin::Bin/./lib";

use App::Lingua::BO::Wylie::Transliteration;

my $app = App::Lingua::BO::Wylie::Transliteration->new;

while (<>) {
  say $app->transliterate($_) for split
}

=pod

=head1 NAME

wylie-transliterate - Executable to `wylie-transliterate`

=head1 VERSION

lib/App/Lingua/BO/Wylie/Transliteration.pm  view on Meta::CPAN

    $word =~ s( @{[$self->scheme]} )[
        my $o;
        my $pre    //= $+{pre    };
        my $super  //= $+{super  };
        my $sub    //= $+{sub    };
        my $script //= $+{script };
        my $vowel  //= $+{vowel  };
        my $post1  //= $+{post1  };
        my $post2  //= $+{post2  };

        # say "word  : $word  ";
        # say "pre   : $pre   ";
        # say "super : $super ";
        # say "script: $script";
        # say "sub   : $sub   ";
        # say "vowel : $vowel ";
        # say "post1 : $post1 ";
        # say "post2 : $post2 ";

        $o .= $self->PRESCRIPT   -> {uc $pre}     if defined $pre;
        $o .= $self->SUPERSCRIPT -> {uc $super}   if defined $super;
        $o .= $self->SCRIPT_SUBJ -> {uc $script}  if defined $script and     defined $super;
        $o .= $self->SCRIPT      -> {uc $script}  if defined $script and $super eq '';
        $o .= $self->SUBSCRIPT   -> {uc $sub}     if defined $sub;
        $o .= $self->VOWEL       -> {uc $vowel}   if defined $vowel and not uc($vowel) eq 'A';
        $o .= $self->POSTSCRIPT1 -> {uc $post1}   if defined $post1;
        $o .= $self->POSTSCRIPT2 -> {uc $post2}   if defined $post2;
      return $o;



( run in 1.321 second using v1.01-cache-2.11-cpan-5e09290becf )