Lingua::EO::Supersignoj - Convert Esperanto characters
use Lingua::EO::Supersignoj; my $transkodigilo = Lingua::EO::Supersignoj->nova( de => 'fronte', al => 'X', u => 'u*' ); print $transkodigilo->transkodigu('Mia ^suoj estas ankau* en la ^cambro.'); # prints: Mia sxuoj estas ankaux en la cxambro. my $transkodigilo = Lingua::EO::Supersignoj->nova(de => 'X'); for (qw(X x H h poste fronte apostrofoj iso unikodo)) { $transkodigilo->al = $_; print $transkodigilo->transkodigu( 'Laux Ludoviko Zamenhof bongustas ' . 'fresxa cxecxa mangxajxo kun spicoj.' ); }
Esperanto has 6 letters that ASCII doesn't have. These characters do exist in Unicode and ISO-8859-3. This object orientated module makes conversion easier.
Returns a converter object. Takes name => value pairs to populate object properties.
The character set to convert from. Must be one of the sets listed below.
The character set to convert to. Must be one of the sets listed below.
An alternative collection of surrogates for u with a caron to be converted. Must be either a single scalar or an array reference.
If any alternative for u-caron or U-caron is given, the ones from the source character set are not used.
To leave u's alone, assign a reference to an empty array: $objekto->u = [];.
$objekto->u = [];
Same as u, but for uppercase U.
u
Takes one or more strings to convert and returns a list of converted strings.
Converts from X if $objekto->de has not been set.
X
$objekto->de
Converts to unikodo if $objekto->al has not been set.
unikodo
$objekto->al
The character sets are array references in %Lingua::EO::Supersignoj::cxapeloj. Feel free to add your own.
Ch ch Gh gh Hh hh Jh jh Sh sh Uw uw
CH ch GH gh HH hh JH jh SH sh UW uw
Cx cx Gx gx Hx hx Jx jx Sx sx Ux ux
CX cx GX gx HX hx JX jx SX sx UX ux
C^ c^ G^ g^ H^ h^ J^ j^ S^ s^ U^ u^
^C ^c ^G ^g ^H ^h ^J ^j ^S ^s ^U ^u
C' c' G' g' H' h' J' j' S' s' U' u'
198 230 216 248 166 182 172 188 222 254 221 253 (iso-8859-3/9)
264 265 284 285 292 293 308 309 348 349 364 365
There currently is no way to define an alternative u-caron to convert to.
Since converting bare u without diacritic would require a word list, this module does not provide such functionality.
Juerd <juerd@cpan.org> <http://juerd.nl/>
perl, encoding, perlunicode.
To install Lingua::EO::Supersignoj, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::EO::Supersignoj
CPAN shell
perl -MCPAN -e shell install Lingua::EO::Supersignoj
For more information on module installation, please visit the detailed CPAN module installation guide.