isme.fst: ../bin/isme.fst ../bin/isme.fst: ../bin/sme.fst ../bin/sme.save ../bin/tok.fst \ ../bin/allcaps.fst
After the dependency line comes the actions themselves. In the Makefile, each line is initiated with a TAB character. Commands are initiated with the "@" character, and arguments delimited with quotes. Quotes within the quotes are preceded by \.
The commands are initiated by an informative banner printed to the screen. Then comes the actions. They are printed to a temporary script file (in the first block, the file is "isme-fst-script", by the @printf command. Then the relevant program (e.g. the program xfst in the first block of the sme Makefile) reads the scriptfile and executes it. Finally, the temporary script file is removed by the @rm command. The makefiles for the other languages are made in the same way.
Note that the source files are taken from the src directory (and referred to by filenames only, since the Makefile itself is in the src directory), whereas the binary files are taken from the bin directory, and hence prefixed with '../bin/'.
abbr.txt
which contains a list of abbreviations used in
the preprocessing phase. The file is generated by script
abbr-extract
which is located in gt/script
directory. It gets as a command line parameter the main abbreviation
file and then a list of files from where multiword expressions should
be searched for. Basically:
abbr.txt: ../bin/abbr.txt ../bin/abbr.txt: ../../script/abbr-extract abbr-sme-lex2.txt \ propernoun-sme-lex.txt closed-sme-lex.txt adv-sme-lex.txt abbr-extract --abbr_lex=abbr-sme-lex2.txt \ --lex=propernoun-sme-lex.txt,closed-sme-lex.txt,adv-sme-lex.txt \ --output=../bin/abbr.txt
exchange "sme" for other lg (smj, sms) Compiling the parser ==================== in twolc (open by typing "twolc") --------------------------------- read-grammar twol-sme.txt compile save-binary twol-sme.bin in lexc (open by typing "lexc") ------------------------------- compile-source *-sme.txt or: run-script skript1 (smj has script file "lskr", sms has no script file) read-rules twol-sme.bin compose-result save-result sme.save in xfst (open by typing "xfst") ------------------------------- load stack caseconv.fst load stack sme.save compose net save stack sme.fst The tok.fst tokenizer is also built in xfst: -------------------------------------------- read-regex < case.regex save stack caseconv.fst