|
our $VERSION = version->declare( 'v0.45.0' );
use if $^V ge v5.12.0, feature => 'unicode_strings' ;
BEGIN {
die "Transliteration requires Perl 5.18 or above"
unless $^V ge v5.18.0;
}
no warnings 'experimental::regex_sets' ;
has 'transforms' => (
is => 'ro' ,
isa => ArrayRef,
init_arg => undef ,
default => sub { [
qr/(?^um:\G.)/ ,
{
type => 'transform' ,
data => [
],
},
{
type => 'conversion' ,
data => [
{
before => q(\p{^script=Han}) ,
after => q() ,
replace => q(([:script=Han:]) ),
result => q(ï·$1) ,
revisit => 0,
},
],
},
{
type => 'transform' ,
data => [
{
from => q(Han) ,
to => q(Spacedhan) ,
},
],
},
{
type => 'conversion' ,
data => [
{
before => q() ,
after => q( ?ç) ,
replace => q(令) ,
result => q(lÃng) ,
revisit => 0,
},
{
before => q() ,
after => q( ?ä¿) ,
replace => q(ä¸) ,
result => q(mò) ,
revisit => 0,
},
{
before => q() ,
after => q( ?å°) ,
replace => q(æ¾¹) ,
result => q(tán) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q( ?å) ,
replace => q(é¿) ,
result => q(zhÇng) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç§) ,
result => q(bì) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å) ,
result => q(bÇ) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(é¿) ,
result => q(cháng) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç§) ,
result => q(chóng) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(é) ,
result => q(chóng) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å) ,
result => q(diÄo) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(å¹²) ,
result => q(gÄn) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(è) ,
result => q(gÄ) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç) ,
result => q(gÄ) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(è¿) ,
result => q(guÅ) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å) ,
result => q(huà ) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(纪) ,
result => q(jÇ) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(ç ) ,
result => q(jūn) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(é) ,
result => q(lià ng) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç) ,
result => q(mù) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç²) ,
result => q(nián) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(åº) ,
result => q(Åu) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç¹) ,
result => q(pó) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(ä») ,
result => q(qiú) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ä»») ,
result => q(rén) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å) ,
result => q(shà n) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å¬) ,
result => q(shà o) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(æ) ,
result => q(shé) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(è) ,
result => q(shè) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(æ²) ,
result => q(shÄn) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(å³) ,
result => q(shì) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(é) ,
result => q(wÄi) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(解) ,
result => q(xiè) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(è) ,
result => q(xīn) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ç) ,
result => q(yÄn) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å°) ,
result => q(yù) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(ä¹) ,
result => q(yuè) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(å) ,
result => q(yùn) ,
revisit => 0,
},
{
before => q(ï·) ,
after => q() ,
replace => q(æ¥) ,
result => q(zhÄ) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(ç¿) ,
result => q(zhái) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(æ¾) ,
result => q(zÄng) ,
revisit => 0,
},
],
},
{
type => 'transform' ,
data => [
{
from => q(Any) ,
to => q(Null) ,
},
],
},
{
type => 'conversion' ,
data => [
{
before => q([^$]) ,
after => q() ,
replace => q(ï·) ,
result => q(\u0020) ,
revisit => 0,
},
{
before => q() ,
after => q() ,
replace => q(ï·) ,
result => q() ,
revisit => 0,
},
],
},
{
type => 'transform' ,
data => [
{
from => q(Han) ,
to => q(Latin) ,
},
]
},
] },
);
no Moo;
1;
|