How to use the CG-3 parser vislcg3
How to use the vislcg3 parser
The command line looks like this (for sme, supposing you stand in the sme directory):
sme$ cat sometext.txt | preprocess --abbr=bin/abbr.txt | lookup -flags mbTT bin/sme.fst | ../script/lookup2cg | vislcg3 -g src/sme-dis.rle | less
Flags and their use
The vislcg3 program contains a large number of flags, or usage options. A list of the flags may be obtained by writing the following command:
i.e., by using the flag --help. The most relevant flags for our use are the following:
- -g src/sme-dis.rle
- This flag selects the grammar file
- --sections n
- This flag sets the number of CONSTRAINT sections that are applied. In this way it is possible to study the effects of one rule set at a time.
- This flag tells the parser to include information of what constraint rules are invoked in each concrete case. The flag is crucial for studying the effects of the different rules.
Didriksen, Tino 2007: Constraint Grammar Manual. 3rd version of the CG formalism variant. http://beta.visl.sdu.dk/cg3/
Karlsson, Fred; Atro Voutilainen, Juha Heikkilä and Arto Anttila 1995: Constraint Grammar. A Language-Independent System for Parsing Unrestricted Text. Mouton the Gruyter.
Tapanainen, Pasi 1996: The Constraint Grammar Parser CG-2. University of Helsinki Publications No. 27.