;; -*- Mode: Lisp; Coding: utf-8 -*- ;;; HAG (Hausa Grammar) ;;; Author: Berthold Crysmann ;;; 2009 ;;; Set LKB/LOGON default font size ;;; Define some reasonable font size (defparameter lkb::*hag-font-size* 17) (in-package :clim-user) (eval-when (compile load eval) (setf *default-text-style* (merge-text-styles (list :sans-serif nil lkb::*hag-font-size*) *default-text-style*)) (export '(*lkb-top-frame* *lkb-top-stream* *last-directory* set-up-lkb-interaction enable-type-interactions disable-type-interactions))) (in-package :mt) (defun mrs-transfer-font () (list :sans-serif :roman lkb::*hag-font-size*)) (in-package :lkb) (def-lkb-parameter *parse-tree-font-size* *hag-font-size* "size of font in parse trees" :user) (def-lkb-parameter *summary-tree-font-size* *hag-font-size* "size of font in parse tree summary") (def-lkb-parameter *fs-type-font-size* *hag-font-size* "size of font in AVMs" :user) (def-lkb-parameter *fs-title-font-size* *hag-font-size* "size of font of AVM window titles" :user) (def-lkb-parameter *type-tree-font-size* *hag-font-size* "size of font in type hierarchy display" :user) (def-lkb-parameter *dialog-font-size* *hag-font-size* "size of font in dialogs" :user) (def-lkb-parameter *comparison-tree-font-size* *hag-font-size* "size of font in tree comparison (tree pane)" :user) (def-lkb-parameter *comparison-dependencies-font-size* *hag-font-size* "size of font in tree comparison (elementary dependencies in tree pane)" :user) (def-lkb-parameter *comparison-discriminant-font-size* *hag-font-size* "size of font in tree comparison (discriminant pane)" :user) (defparameter *active-parsing-p* t) ;;; Strings (defparameter *toptype* '*top*) (defparameter *string-type* 'string "a special type name - any lisp strings are subtypes of it") ;;; Lexical files (defparameter *orth-path* '(stem)) (defparameter *list-tail* '(rest)) (defparameter *list-head* '(first)) (defparameter *empty-list-type* 'null) (defparameter *list-type* 'list) (defparameter *diff-list-type* 'diff-list) (defparameter *diff-list-list* 'list) (defparameter *diff-list-last* 'last) (defparameter *lex-rule-suffix* "_IR" "creates the inflectional rule name from the information in irregs.tab - for PAGE compatability") (defparameter *irregular-forms-only-p* t) ;;; ;;; input characters to be ignored (i.e. suppressed) in tokenization ;;; (defparameter *punctuation-characters* (append '(#\space #\! #\" #\& #\( #\) #\* #\+ #\, #\. #\/ #\; #\< #\= #\> #\? #\@ #\[ #\\ #\] #\^ #\_ #\` #\{ #\| #\} #\~) #+:ics '(#\ideographic_full_stop #\fullwidth_question_mark #\horizontal_ellipsis #\fullwidth_full_stop #\fullwidth_exclamation_mark #\black_circle #\fullwidth_comma #\ideographic_space #\katakana_middle_dot #\white_circle))) (defparameter *display-type-hierarchy-on-load* nil) (defparameter *feature-ordering* '( SYNSEM C-CONT ARGS SUPRA LKEYS LOCAL NON-LOCAL CAT CONT)) ;;; Parsing (defparameter *chart-limit* 1000) (defparameter *maximum-number-of-edges* 4000) (defparameter *mother-feature* NIL "The feature giving the mother in a grammar rule") (defparameter *start-symbol* '(root ;;; Consistent tone/length marking ;;; (none, high, low, both) ; root_spelling_robust ;;; Robust handling of hooked letters ; root_supra_robust ;;; Partial tone/length specification ; root_spelling_supra_robust ;;; Combination of previous two sat-phrase ;;; Saturated phrase lex-root ) "specifing valid parses") (defparameter *maximal-lex-rule-applications* 9 "The number of lexical rule applications which may be made before it is assumed that some rules are applying circularly") (defparameter *deleted-daughter-features* '(ARGS HEAD-DTR NON-HEAD-DTR DTR) "features pointing to daughters deleted on building a constituent") ;;; Parse tree node labels ;;; the path where the name string is stored (defparameter *label-path* '(LNAME)) ;;; the path for the meta prefix symbol (defparameter *prefix-path* '(META-PREFIX)) ;;; the path for the meta suffix symbol (defparameter *suffix-path* '(META-SUFFIX)) ;;; the path for the recursive category (defparameter *recursive-path* '(SYNSEM NON-LOCAL SLASH LIST FIRST)) ;;; the path inside the node to be unified with the recursive node (defparameter *local-path* '(SYNSEM LOCAL)) ;;; the path inside the node to be unified with the label node (defparameter *label-fs-path* '()) (defparameter *label-template-type* 'label) ;;; Morphology (defparameter *irregular-forms-only-p* t) (defparameter *most-specific-only-p* t) (setf *known-cyclic-rules* '( opt-do_lr opt-io_lr opt-comp2_lr )) ;;; Generation (defparameter *gen-ignore-rules* '( ;;; Block tone rules in generation (new) _hh_ir _ll_ir _h_ir _l_ir _hl_long_ir _hl_ir ;;; Block underspecified tone rules in generation _**_ir _*_ir ;;; Block robust spelling of hooked letters in generation robust-spelling_ir ; verb-C-id_ir )) (defparameter *duplicate-lex-ids* '( wandà_pron waddà_pron ni_pron_hi ka_pron_hi ki_pron_hi shi_pron_hi ta_pron_hi mu_pron_hi ku_pron_hi su_pron_hi ni_pron_lo ka_pron_lo ki_pron_lo shi_pron_lo ta_pron_lo mu_pron_lo ku_pron_lo su_pron_lo ) ) ;;; Packing restrictor in generation ;;; Pretty much standard ;;; _LTONE/_LLEN and _RTONE/_RLEN should not give additional unpacking failures ;;; in generation since marking is inherently consistent ;;; Local tone/length-lists mirror the yield of the local tree ;;; so restriction will support packing of syntacto-semantically neutral tone/length variants (defparameter mrs::*null-semantics-hack-p* nil) (defparameter *chart-packing-p* nil) (defparameter *packing-restrictor* '(RELS HCONS TONES LENGTHS TM LM)) ;(defparameter *packing-restrictor* '()) #-:arboretum (defparameter *gen-packing-p* t) (defparameter *gen-filtering-p* t) (defparameter *gen-filtering-debug* nil) (defparameter *gen-equate-qeqs-p* t) (defparameter *bypass-equality-check* nil) #+:logon (defparameter *bypass-equality-check* :filter) #+:arboretum (defparameter *bypass-equality-check* t) (defparameter *gen-equality-debug* t) ;;; Token mapping ;; token type: (defparameter *token-type* 'token) ;; paths in token fs: (defparameter *token-form-path* '(+FORM)) (defparameter *token-id-path* '(+ID)) (defparameter *token-from-path* '(+FROM)) (defparameter *token-to-path* '(+TO)) (defparameter *token-postags-path* '(+TNT +TAGS)) (defparameter *token-posprobs-path* '(+TNT +PRBS)) ;; path to token feature structures in lexical items: (defparameter *lexicon-tokens-path* '(TOKENS +LIST)) (defparameter *lexicon-last-token-path* '(TOKENS +LAST)) ;; paths in chart mapping rules: (defparameter *chart-mapping-context-path* '(+CONTEXT)) (defparameter *chart-mapping-input-path* '(+INPUT)) (defparameter *chart-mapping-output-path* '(+OUTPUT)) (defparameter *chart-mapping-position-path* '(+POSITION)) (defparameter *chart-mapping-jump-path* '(+JUMP)) ;;; for the compare function ;;; For :classic mode (lexitems only distinguished in semantics) (defparameter *discriminant-path* '(synsem lkeys keyrel pred)) ;;; Do not treebank semantically equivalent derivations ;;; (setf lkb::*tree-discriminants-mode* :modern) (defparameter *tree-discriminants-mode* :classic) ;;; Generation server (setf *translate-grid* '(:ha . (:ha)))