.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Encode::Arabic::Buckwalter 3pm"
.TH Encode::Arabic::Buckwalter 3pm "2010-01-18" "perl v5.10.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Encode::Arabic::Buckwalter \- Tim Buckwalter's transliteration of Arabic
.SH "REVISION"
.IX Header "REVISION"
.Vb 1
\& $Revision: 179 $ $Date: 2007\-01\-14 01:23:25 +0100 (Sun, 14 Jan 2007) $
.Ve
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& use Encode::Arabic::Buckwalter; # imports just like \*(Aquse Encode\*(Aq would, plus more
\&
\& while ($line = <>) { # Tim Buckwalter\*(Aqs mapping into the Arabic script
\&
\& print encode \*(Aqutf8\*(Aq, decode \*(Aqbuckwalter\*(Aq, $line; # \*(AqBuckwalter\*(Aq alias \*(AqTim\*(Aq
\& }
\&
\& # shell filter of data, e.g. in *n*x systems instead of viewing the Arabic script proper
\&
\& % perl \-MEncode::Arabic::Buckwalter \-pe \*(Aq$_ = encode "buckwalter", decode "utf8", $_\*(Aq
\&
\& # employing the modes of conversion for filtering and trimming
\&
\& Encode::Arabic::enmode \*(Aqbuckwalter\*(Aq, \*(Aqnosukuun\*(Aq, \*(Aq>&< xml\*(Aq;
\& Encode::Arabic::Buckwalter\->demode(undef, undef, \*(Aqstrip _\*(Aq);
\&
\& $decode = "Aiqora>o h\`*aA {l_n~a_S~a bi_\|_\|_{notibaAhK.";
\& $encode = encode \*(Aqbuckwalter\*(Aq, decode \*(Aqbuckwalter\*(Aq, $decode;
\&
\& # $encode eq "AiqraO h\`*aA Aln~aS~a biAntibaAhK."
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Tim Buckwalter's notation is a one-to-one transliteration of the Arabic script for Modern Standard
Arabic, using lower \s-1ASCII\s0 characters to encode the graphemes of the original script. This system
has been very popular in Natural Language Processing, however, there are limits to its applicability
due to numerous non-alphabetic codes involved.
.SS "\s-1IMPLEMENTATION\s0"
.IX Subsection "IMPLEMENTATION"
The module takes care of the Encode::Encoding programming interface, while the
effective code is Tim Buckwalter's \f(CW\*(C`tr\*(C'\fRick:
.PP
.Vb 3
\& $encode =~ tr[\ex{060C}\ex{061B}\ex{061F}\ex{0621}\-\ex{063A}\ex{0640}\-\ex{0652} # !! no break in true perl !!
\& \ex{0670}\ex{0671}\ex{067E}\ex{0686}\ex{0698}\ex{06A4}\ex{06AF}\ex{0660}\-\ex{0669}]
\& [,;?\*(Aq|>&<}AbptvjHxd*rzs$SDTZEg_fqklmnhwYyFNKaui~o\`{PJRVG0\-9];
\&
\& $decode =~ tr[,;?\*(Aq|>&<}AbptvjHxd*rzs$SDTZEg_fqklmnhwYyFNKaui~o\`{PJRVG0\-9]
\& [\ex{060C}\ex{061B}\ex{061F}\ex{0621}\-\ex{063A}\ex{0640}\-\ex{0652} # !! no break in true perl !!
\& \ex{0670}\ex{0671}\ex{067E}\ex{0686}\ex{0698}\ex{06A4}\ex{06AF}\ex{0660}\-\ex{0669}];
.Ve
.SS "\s-1EXPORTS\s0 & \s-1MODES\s0"
.IX Subsection "EXPORTS & MODES"
If the first element in the list to \f(CW\*(C`use\*(C'\fR is \f(CW\*(C`:xml\*(C'\fR, the alternative mapping is introduced that suits
the \fB\s-1XML\s0 etiquette\fR. This option is there only to replace the \f(CW\*(C`>&<\*(C'\fR reserved characters by \f(CW\*(C`OWI\*(C'\fR
while still having a one-to-one notation. There is no \s-1XML\s0 parsing involved, and the markup would get
distorted if subject to \f(CW\*(C`decode\*(C'\fR!
.PP
.Vb 2
\& $using_xml = eval q { use Encode::Arabic::Buckwalter \*(Aq:xml\*(Aq; decode \*(Aqbuckwalter\*(Aq, \*(AqOWI\*(Aq };
\& $classical = eval q { use Encode::Arabic::Buckwalter; decode \*(Aqbuckwalter\*(Aq, \*(Aq>&<\*(Aq };
\&
\& # $classical eq $using_xml and $classical eq "\ex{0623}\ex{0624}\ex{0625}"
.Ve
.PP
The module exports as if \f(CW\*(C`use Encode\*(C'\fR also appeared in the package. The other \f(CW\*(C`import\*(C'\fR options are
just delegated to Encode and imports performed properly.
.PP
The \fBconversion modes\fR of this module allow to override the setting of the \f(CW\*(C`:xml\*(C'\fR option, in addition to
filtering out diacritical marks and stripping off \fIkashida\fR. The modes and aliases relate like this:
.PP
.Vb 1
\& our %Encode::Arabic::Buckwalter::modemap = (
\&
\& \*(Aqdefault\*(Aq => 0, \*(Aqundef\*(Aq => 0,
\&
\& \*(Aqfullvocalize\*(Aq => 0, \*(Aqfull\*(Aq => 0,
\&
\& \*(Aqnowasla\*(Aq => 4,
\&
\& \*(Aqvocalize\*(Aq => 3, \*(Aqnosukuun\*(Aq => 3,
\&
\& \*(Aqnovocalize\*(Aq => 2, \*(Aqnovowels\*(Aq => 2, \*(Aqnone\*(Aq => 2,
\&
\& \*(Aqnoshadda\*(Aq => 1, \*(Aqnoneplus\*(Aq => 1,
\& );
.Ve
.ie n .IP "enmode (\fI\fI$obj\fI,\fR $mode, $xml, $kshd)" 4
.el .IP "enmode (\fI\f(CI$obj\fI,\fR \f(CW$mode\fR, \f(CW$xml\fR, \f(CW$kshd\fR)" 4
.IX Item "enmode ($obj, $mode, $xml, $kshd)"
.PD 0
.ie n .IP "demode (\fI\fI$obj\fI,\fR $mode, $xml, $kshd)" 4
.el .IP "demode (\fI\f(CI$obj\fI,\fR \f(CW$mode\fR, \f(CW$xml\fR, \f(CW$kshd\fR)" 4
.IX Item "demode ($obj, $mode, $xml, $kshd)"
.PD
These methods can be invoked directly or through the respective functions of Encode::Arabic. The
meaning of the extra parameters follows from the examples of usage.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Encode::Arabic, Encode, Encode::Encoding
.PP
Tim Buckwalter's Qamus
.PP
Buckwalter Arabic Morphological Analyzer
.PP
Xerox Arabic Home Page
.SH "AUTHOR"
.IX Header "AUTHOR"
Otakar Smrz,
.PP
.Vb 1
\& eval { \*(AqE\*(Aq . ( join \*(Aq.\*(Aq, qw \*(Aqotakar smrz\*(Aq ) . "\ex40" . ( join \*(Aq.\*(Aq, qw \*(Aqmff cuni cz\*(Aq ) . \*(AqE\*(Aq }
.Ve
.PP
Perl is also designed to make the easy jobs not that easy ;)
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
Copyright 2003\-2007 by Otakar Smrz
.PP
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.