Sample mapfiles for conversion from one scheme to mozhi scheme
Sample mapfiles from mozhi scheme to some of the available fonts
Source code for transliteration from English to Malayalam script
Source code for transliteration from Malayalam to English script
Contains additional .c files required for compilation in Windows environment.
Will contain executables and .c/.h files after the build. Its structure will be
Documentation in sgml, html, ascii and ps
bin ----- malbin ------ schm_schm ---- <binary files for schm2schm>
| |
| +----- schm_font ---- <binary files for schm2font>
|
+------ lambin ------ schm_schm ---- <binary files for schm2schm>
| |
| +----- schm_font ---- <binary files for schm2font>
|
+------ malapi ------ schm_schm ---- <schemes> -- .[ch] files
|
+----- schm_font ---- <fonts> ---- .[ch] files
Perl is available from http://language.perl.com/info/software.html and flex, bison, and gcc from http://www.gnu.org/order/ftp.html
unzip varamozhi.zip
varamozhi/
varamozhi/schm_schm/
and varamozhi/schm_font/. The files in the first directory
map between two transliteration schemes and the second one
between a font and a transliteration scheme. So these
configuration files are called mapfiles. They can be used as
they are or modified for different scheme and font. Syntax and
semantics of the entries in a mapfile are explained in
a section below.
varamozhi/Makefile.
SCHMLIST representing the mapfiles to be used; typically
for scheme to scheme conversion.SCHMDIR representing the directory where mapfiles
specified by $SCHMLIST are found.FONTLIST representing the mapfiles to be used; typically
for scheme to font conversion.FONTDIR representing the directory where mapfiles
specified by $FONTLIST are found.PARSER will specify the parser generator to be used.
It should be yacc like. One choice other than yacc
would be bison.BINDIR is the directory where binaries will be created.$SCHMLIST or $FONTLIST.
make
This will create all the executables for scheme to scheme
and scheme to font conversion in varamozhi/bin/malbin/*.
Similarly executables doing the reverse in
varamozhi/bin/lambin/*.
make mal.make lam.make api will generate the API functions for forward
conversion.
This creates all the .c and .h files; but will not make
the executable. All the required .c and .h files are copied
to varamozhi/bin directory.
make clean (optional)
May need -Xa1000 option for flex.
You need to have a cross platform CASE tool which will give you flex and yacc. Two such case tools are:
If you are using these tools, you may need to edit
make variable like $PARSER and $SCANNER accordingly.
If you could reach up to the .c and .h files in a Unix
machine and just want to make the .exe in NT/windows,
take .c/.h files from varamozhi/bin/malapi/<schm_..>/<font_or_scheme>/
directory and alloca.c and getopt.c from varamozhi/win/,
put them in MS machine and do the compilation as:
cl /Femal.exe y.tab.c lex.yy.c alloca.c getopt.c
The .map file maps between the transliteration scheme and
the font. varamozhi/schm_font and varamozhi/schm_schm
has few sample mapfiles. In this section we look at the syntax of mapfile
entries.
A mapfile has following sections:
This section provides the information which is not the part of transliteration scheme definition.
Font = <font_name>. This font name will be used
in the HTML font tag when output in in HTML.
Comment = <Left_comment_tag>, <Right_comment_tag>.
Carry Comment = Yes/No. No is
the default. See detailed discussion on usage of -c flag of mal.
Output HTML = Yes/No. No is
the default. See detailed discussion on usage of -h flag of mal.
Allow R Dot = Yes/No. No is
the default. See detailed discussion on usage of -r flag of mal.
Please read section definitions.
All other sections start with the special tag `%%'. All
lines before next `%%' or end of file will be in that section.
That is nth section will start with nth `%%' tag.
Each line in a section will contain a number of fields separated
by `='. Except the last, all fields will represent same
letter or symbol. The program lam will use only the
first string while transliteration. Font information is
encoded in the last field. This field will have at the
most four subfields separated by commas. These subfields
are explained below.
The first subfield will represent the independent glyph,
the second and third subfields will represent right and
left sign glyphs respectively. The last one will represent
the chillu glyph. Each subfield should
represent the corresponding font key stroke. If that key
stoke is not a normal typewriter character (an Alt+ key
combination) you need to write its decimal ASCII number
quoted with a slash (eg : \147). Now if more than two key
strokes represent same glyph, then write all of them as
| (pipe symbol) separated (eg: \147|\148). The program mal will
use only the first one. That is \147 from previous example.
, = and | are used as field separators.# is used for commenting.# , \ = |\b represents single space.\n represents newline character.
All symbols which are not specified in the `mapfile' will be copied as such and will be considered as Malayalam characters when font tags are attached in the HTML output.