Constraint Grammar Manual 3rd version of the CG formalism variant Mr. Tino Didriksen, GrammarSoft ApS Constraint Grammar Manual: 3rd version of the CG formalism variant by Mr. Tino Didriksen Copyright © 2007-2011 GrammarSoft ApS Table of Contents 1. Intro . 1 Caveat Emptor . 1 What this is. 1 Naming . 1 Unicode . 1 Dicussion, Mailing Lists, Bug Reports, etc. 1 2. License . 2 GNU General Public License . 2 Open Source Exception . 2 Commercial/Proprietary License . 2 3. Installation & Updating . 3 CMake Notes . 3 Ubuntu / Debian . 3 Fedora / Red Hat . 3 Mac OS X . 4 Windows . 4 Installing ICU . 4 Getting & Compiling VISL CG-3 . 4 Updating VISL CG-3 . 5 Regression Testing . 5 Cygwin . 5 4. Contributing & Subversion Access . 6 5. Compatibility and Incompatibilities . 7 Gotcha's . 7 Magic Readings . 7 NOT and NEGATE . 7 PREFERRED-TARGETS . 8 Default Codepage / Encoding . 8 Set Operator - . 8 Scanning Past Point of Origin . 8 >>> and <<< . 8 Rule Application Order . 8 Endless Loops . 9 Visibility of Mapped Tags . 9 Incompatibilites . 9 Mappings . 9 Baseforms & Mixed Input . 10 6. Command Line Reference . 11 vislcg3 . 11 cg-conv . 12 cg-comp . 12 cg-proc . 12 cg3-autobin.pl . 12 7. Input/Output Stream Format . 13 Apertium Format . 13 VISL CG Format . 13 8. Grammar . 15 INCLUDE . 15 Sections . 15 BEFORE-SECTIONS . 15 SECTION . 15 AFTER-SECTIONS . 16 NULL-SECTION . 16 Ordering of sections in grammar . 16 --sections with ranges . 16 9. Rules . 17 iii VISL CG-3 Manual Cheat Sheet . ADD . COPY . DELIMIT . EXTERNAL . ADDCOHORT . REMCOHORT . MOVE, SWITCH . REPLACE . APPEND . SUBSTITUTE . SETVARIABLE . REMVARIABLE . MAP . UNMAP . Tag Lists Can Be Sets . Named Rules . Rule Options . NEAREST . ALLOWLOOP . ALLOWCROSS . DELAYED . IMMEDIATE . LOOKDELAYED . LOOKDELETED . UNMAPLAST . UNSAFE . SAFE . REMEMBERX . RESETX . KEEPORDER . VARYORDER . ENCL_INNER . ENCL_OUTER . ENCL_FINAL . ENCL_ANY . WITHCHILD . NOCHILD . ITERATE . NOITERATE . REVERSE . 10. Contextual Tests . Position Element Order . NEGATE . CBARRIER . Spanning Window Boundaries . Span Both . Span Left . Span Right . X Marks the Spot . Set Mark . Jump to Mark . Attach To . Test Deleted/Delayed Readings . Look at Deleted Readings . Look at Delayed Readings . Scanning Past Point of Origin . --no-pass-origin, -o . No Pass Origin. VISL CG-3 Manual 11. 12. 13. 14. 15. 16. 17. Pass Origin . Nearest Neighbor . Dependencies . Relations . Parenthesis Enclosures . Example . Contextual Position L . Contextual Position R . Magic Tag _LEFT_ . Magic Tag _RIGHT_ . Magic Tag _ENCL_ . Magic Set _LEFT_ . Magic Set _RIGHT_ . Magic Set _ENCL_ . Magic Set _PAREN_ . Making use of Dependencies . SETPARENT . SETCHILD . Existing Trees in Input . Creating Trees from Grammar . Contextual Tests . Parent . Children . Siblings . Self . Deep Scan . All Scan . None Scan . Making use of Relations . ADDRELATION, ADDRELATIONS . SETRELATION, SETRELATIONS . REMRELATION, REMRELATIONS . Existing Relations in Input . Contextual Tests . Specific Relation . Any Relation . All Scan . None Scan . Making use of Probabilistic / Statistic Input . Templates . Sets . Set Operators . Union: OR and | . Difference: - . Symmetric Difference: # . Intersection: # . Cartesian Product: + . Fail-Fast: ^ . Magic Sets . (*) . _S_DELIMITERS_ . _S_SOFT_DELIMITERS_ . Magic Set _TARGET_ . Magic Set _MARK_ . Magic Set _ATTACHTO_ . Unification . Tag Unification . Top-Level Set Unification.


