;;; -*- Mode: TDL; Package: LKB -*- ;;; ;;; HPSG Grammar Matrix Version 0.9 (sort of) ;;; ;;; Copyright (c) 2002-2005 ;;; Emily M. Bender, Dan Flickinger, Stephan Oepen ;;; see licence.txt for conditions ;;; ;;; Projects using the Grammar Matrix should reference ;;; http://www.delph-in.net/matrix, the version used ;;; and Bender, Flickiner, & Oepen 2002. ;;; ;;; Based on: ;;; ;;; LinGO Grammar: fundamentals.tdl ;;; Copyright Daniel Flickinger 1994-2001 ;;; Initial development Rob Malouf, 3-Nov-1994 ;;; ;;; JACY Grammar: fundamentals.tdl, mrsbasic.tdl ;;; Developed by Melanie Siegel, Emily M. Bender ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Top-level feature geometry ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Types for Sign, Word, Phrase, and Lex-Entry sign-min := avm & [ STEM list ]. basic-sign := sign-min & [ KEY-ARG bool ]. sign := basic-sign & [ SYNSEM synsem, ARGS list, INFLECTED bool, ROOT bool ]. ; C-CONT encodes the semantic contribution of the rule (phrasal ; or lexical). phrase-or-lexrule := sign & [ SYNSEM canonical-synsem & [ LOCAL.CONT.HOOK #hook], C-CONT mrs-min & [ HOOK #hook] ]. word-or-lexrule-min := sign-min. ; ALTS allow lexical entries to block lexical rule application word-or-lexrule := word-or-lexrule-min & sign & [ ALTS alts-min ]. alts-min := avm. alts := alts-min & [ PASSIVE bool ]. no-alts := alts-min. ; Not all words have lex-synsem - e.g. lexical PPs like "tomorrow" are ; phr-synsem since they can be post-nominal modifiers. word := word-or-lexrule & [ ROOT - ]. lex-item := word-or-lexrule. norm-lex-item := lex-item & [ SYNSEM [ LOCAL.CONT [ HOOK [ LTOP #ltop, INDEX #index ], RELS.LIST.FIRST #keyrel ], LKEYS.KEYREL #keyrel & [ LBL #ltop, ARG0 #index ] ] ]. ; (MS 2003-12-17) We cannot safely switch to the Matrix 0.6 definition of lexeme. ; This needs some fundamental adaptations of the word and lexeme concepts. ;lexeme := norm-lex-item & ; [ INFLECTED - ]. ;; Not all phrases have SYNSEM phr-synsem, since we need to allow the ;; head-comp rules to build signs which are still [ SYNSEM lex-synsem ;; ], for constructions like "twenty-two" and "five fifteen p.m.". So ;; most phrases will assign the type phr-synsem to the value of ;; SYNSEM, but not all. ; Phrases don't have argument structure, but ARG-S is a feature ; of local, not sign. So rather than have subtypes of local for ; phrases and lexical items, constrain phrases to have empty ARG-S. phrase := phrase-or-lexrule & [ SYNSEM.LOCAL.ARG-S < >, ROOT bool ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Affixation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; non-affix-bearing := word-or-lexrule & [ INFLECTED + ]. ; Rule rule := sign & [ RULE-NAME string ]. ; LABEL-NAME and META used for labeling nodes in parse trees tree-node-label := *top* & [ NODE sign ]. label := sign & [ LABEL-NAME string ]. ; For complex node labels, like S/NP meta := sign & [ META-PREFIX string, META-SUFFIX string ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; SYNSEM values ; ERB 2007-02-05 Moving to an analysis of discourse status/cognitive ; status of referents following Borthen & Haugereid 2005. Replacing ; DEF and DEF-OPT with COG-ST and OPT-CS. synsem-min := avm & [ OPT bool, OPT-CS cog-st, LOCAL mod-local, NON-LOCAL non-local-min ]. lex-or-phrase-synsem := synsem-min & [ LEX bool ]. synsem := synsem-min. expressed-synsem := synsem. canonical-synsem := expressed-synsem & [ MODIFIED xmod ]. lex-synsem := canonical-synsem & lex-or-phrase-synsem & [ LOCAL local-min, LEX +, LKEYS lexkeys ]. ; ERB (2005-08-10) We want to make sure that head-comp phrases ; don't have the feature LKEYS, even if they are LIGHT +. phr-synsem-min := canonical-synsem & lex-or-phrase-synsem & [ LOCAL local-min ]. phr-synsem := phr-synsem-min & [ LEX - ]. non-canonical := synsem & [ LOCAL.CONT.HOOK.INDEX event-or-ref-index ]. expressed-non-canonical := non-canonical & expressed-synsem. gap := expressed-non-canonical & [ LOCAL #local, NON-LOCAL [ REL 0-dlist, QUE 0-dlist, SLASH 1-dlist & [ LIST < #local > ] ] ]. unexpressed := synsem-min & [ NON-LOCAL [ SLASH 0-dlist, REL 0-dlist, QUE 0-dlist ] ]. unexpressed-reg := unexpressed & non-canonical. anti-synsem := unexpressed. ; & ;"A contrasting type to ordinary synsems (expressed ;and unexpressed) which is sometimes useful. No longer ;explicitly used in the Matrix.". ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; LOCAL & NON-LOCAL values ; The feature AGR is introduced on LOCAL rather than on CAT (or on HEAD) since ; coordination schema unify the CAT value of the daughters with that of then ; mother, but need to be able to change AGR on the mother (to get plural ; agreement on verb when subject is a coordinated NP with "and" vs. "or"). mod-local := avm. local-min := mod-local & [ CAT cat-min, CONT mrs-min, AGR individual ]. local := local-min & [ CTXT ctxt-min, ARG-S list ]. ; Types for distinguishing scopal v. intersective modifiers. ; (These types are used in the MOD value of modifiers, and ; referenced by the scopal/intersective head-adjunct rules.) scopal-mod := local. intersective-mod := local. non-local-min := avm. non-local := non-local-min & [ SLASH 0-1-dlist, QUE 0-1-dlist, REL 0-1-dlist ]. non-local-none := non-local & [ SLASH 0-dlist & [ LIST < > ], QUE 0-dlist, REL 0-dlist ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; CAT values cat-min := avm. ; ERB 2004-05-05 Following ERG, add a feature HC-LIGHT which indicates ; whether a head-comp phrase projected from a head is treated as light ; or heavy. That is, whether or not a phrase consisting of heads and ; complements is light or heavy is taken to be a lexical property of ; the head. ; MC stands for 'Main clause', and is used to distinguish phenomena ; which can only occur in main (+) or subordinate clauses (-). The ; value of MC is luk, allowing for a third possibility of na, for ; not applicable. cat := cat-min & [ HEAD head-min, VAL valence-min, MC luk, HC-LIGHT luk, POSTHEAD bool ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; HEAD & VAL head-min := avm. ; It is expected that head will have many more features, but it ; is not yet clear which are relevant crosslinguistically. In ; the English grammar, HEAD features include CASE, PRD, AUX, INV, ; TAM, and VFORM. (Re: TAM --- it is sometimes useful to have the ; semantic information encoded in EVENT.E accessible via the head ; path.) ; Which subtypes of head are necessary and which head features are ; declared for which subtypes is also a language-specific question. head := head-min & [ MOD list, KEYS keys_min ]. valence-min := avm. valence := valence-min & [ SUBJ list, SPR list, COMPS list, SPEC list, --KEYCOMP avm ]. keys_min := avm. keys := keys_min & [ KEY predsort, ALTKEY predsort ]. ; One of a grammatically salient inventory of semantic sorts, such as ; 'animate' or 'time' semsort := sort. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; CONT values ; ; HOOK : Externally visible attributes of a sign ; RELS diff-list ; List of semantic relations ; HCONS diff-list ; Scope constraints: list of qeq's mrs-min := avm. ; ERB 2007-01-21 Removing feature MSG here (moving it to a feature--SF--- ; of events). mrs := mrs-min & [ HOOK hook, RELS diff-list, HCONS diff-list ]. ; HOOK values include ; LTOP ; Local top handle ; INDEX ; The salient nominal instance or event ; XARG ; The external (controlled) argument of a phrase hook := avm & [ GTOP handle, LTOP handle, INDEX individual, XARG individual ]. ; MRSs are divided into psoas (with a distinguished event) and ; nom-objs (with a distinguished index). We use a polymorphic ; attribute name INDEX for both of these, to simplify manipulation of ; these objects; for example, modifying PPs assign as their ARG's ; value the INDEX of the phrase they modify, whether it's an N-bar ; (with a ref-ind value) or a VP (with an event value). Similarly ; useful for coordination. psoa := mrs & [ HOOK.INDEX event ]. nom-obj := mrs & [ HOOK.INDEX index ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; LKEYS attributes, providing pointers to semantic relations and complement ; predsorts in lexical types: ; KEYREL relation ; Pointer to main relation in RELS ; ALTKEYREL relation ; Pointer to an alternate relation in RELS ; --COMPKEY predsort ; Pointer to the first complement's KEY predsort ; --OCOMPKEY predsort ; Pointer to the oblique complement's KEY predsort ; lexkeys := avm & ; [ KEYREL relation, ; ALTKEYREL relation, ; --COMPKEY predsort, ; --OCOMPKEY predsort ]. ;; ;;; Moving to this may save some space (DPF and FCB 2008-08-05) ;;; lexkeys := avm & [ KEYREL relation ]. lexkeys_full := lexkeys & [ ALTKEYREL relation, --COMPKEY predsort, --OCOMPKEY predsort ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; CTXT values ctxt-min := avm. ctxt := ctxt-min & [ ACTIVATED bool, PRESUP diff-list ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Basic semantic types ; The message represents the semantic type of a clause (cf. Ginzburg & ; Sag 2000). All clauses have messages. Elements that take clauses ; as semantic arguments should end up with the LBL of the clause as ; the value of ARGn, L/R-HNDL, etc. The MARG (message argument) of a ; message is a handle that qeqs the LBL of the main verb in the clause. ; This leaves room for quantifiers to scope at each clause without ; allowing scope ambiguity between quanitifers and messages, as it is ; not clear what that would mean. ; basic_message := relation. ; message := basic_message & ; [ PRED message_m_rel, ; MARG handle ]. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Message preds ; message_m_rel := predsort. ; command_m_rel := message_m_rel. ; prop-or-ques_m_rel := message_m_rel. ;for COMPS of e.g. 'know' ; proposition_m_rel := prop-or-ques_m_rel. ; abstr-ques_m_rel := prop-or-ques_m_rel. ; question_m_rel := abstr-ques_m_rel. ; no-msg := basic_message. ; ; Subtype of int_rel for tag questions and structures in other languages ; ; with equivalent pragmatics. ; ne_m_rel := abstr-ques_m_rel. ; Constrains handle of scopable argument HARG relative to one ; outscoped LARG handle (the "H" is mnemonic for either "higher" or ; "hole" argument, while the "L" is mnemonic for either "lower" or ; "label" argument. qeq := avm & [ HARG handle, LARG handle ]. semarg := avm & [ INSTLOC string ]. ;"INSTLOC is used by generator to index input. Changed from ;value instloc to value string in July 2004. The grammar ;should never need to make reference to it beyond this." handle := semarg. individual := semarg & [ SORT semsort ]. ; The INDEX value of a nom-obj is an index (expletive or ; referential). ; ERB 2004-05-10 Add a feature DEF which encodes definiteness ; for (in)definite null instantiation, and possibly other uses. ; The null instantiation use might get superceded by a Sem-I based ; solution. ; ERB 2007-02-05 Moving to an analysis of discourse status/cognitive ; status of referents following Borthen & Haugereid 2005. Replacing ; DEF and DEF-OPT with COG-ST and OPT-CS. ; ERB 2007-05-16 Can't put SPECI inside COG-ST, or the generator won't ; pay attention to the value of COG-ST. So, making it parallel. index := individual & [ COG-ST cog-st, SPECI bool ]. ; ERB 2007-02-05 Hierarchy from Borthen and Haugereid of possible ; COG-ST values. Departing from B&H analysis by putting SPECI on ; this type (as well as by making COG-ST a feature of indicies rather ; than parallel to the indices in the next level up). cog-st := avm. activ-or-less := cog-st. uniq-or-more := cog-st. uniq+fam+act := activ-or-less & uniq-or-more. fam-or-less := activ-or-less. fam-or-more := uniq-or-more. activ+fam := uniq+fam+act & fam-or-more. uniq+fam := uniq+fam+act & fam-or-less. uniq-or-less := fam-or-less. activ-or-more := fam-or-more. type-id := uniq-or-less. uniq-id := uniq-or-less & uniq+fam. familiar := uniq+fam & activ+fam. activated := activ+fam & activ-or-more. in-foc := activ-or-more. ; This is the type of the index of the phrase modified by predicative ; PPs, which can either modify a ref-ind nominal or an event VP. event-or-ref-index := individual. ; Expletives get distinguished index type so they can be ; selected semantically. In English, this type has subtypes ; for it and there. Most languages have at most one expletive, ; so those aren't included here. expl-ind := index. ref-ind := index & event-or-ref-index & [ PNG png ]. ; Types encoding agreement information, analyzed as a part of the ; index, following Pollard & Sag 1994. Which subtypes and features ; are appropriate seems highly language dependent. The agreement ; system of English doesn't justify a full cross-classification of ; number and gender, so the features of png are PN and GENDER in the ; English grammar. (See Flickinger 2000.) Sag & Wasow 1999 declare ; GENDER as a feature of the png type 3sg. png := avm. ; Create subtypes of tense, aspect and mood as appropriate. tense := sort. aspect := sort. mood := sort. tam := avm & [ TENSE tense, ASPECT aspect, MOOD mood ]. ; Sentence force: SF, this replaces MSG. iforce := avm. prop-or-ques := iforce. prop := prop-or-ques. ques := prop-or-ques. comm := iforce. ; for 'ne' questions ne-sf := ques. event := event-or-ref-index & [ E tam, SF iforce ]. ; Coordinated phrases have coordinated indices as their INDEX ; values. These are meant to be interpreted as pointers to ; the set of coordinated indices. ; Name changed in Matrix 9.0 conj-index := event-or-ref-index. conj-event := conj-index & event. conj-ref-ind := conj-index & ref-ind. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Basic relation types ; Relations are classified according to the types of arguments they take. All ; relations have a handle. In addition, quantifier relations have a bound ; variable and a restriction, nominal relations have an instance, and event ; relations have an event. Furthermore, nominal relations and event relations ; can have additional roles, depending on their meaning. ; WLINK links semantic relation to input string elements, more or less. ; This becomes useful whenever a grammar is used in some application. ; (MS 2004-06-14) Added CFROM and CTO to get the character positions in the RMRS. ; relation := avm & ; [ LBL handle, ; WLINK list, ; PRED predsort, ; CFROM *top*, ; CTO *top* ]. ; changed WLINK to LNK to humour oe ? now change it back ? Can we lose CFROM/CTO ??? relation := avm & [ LBL handle, LNK list, PRED predsort, CFROM *top*, CTO *top* ]. ; Abstract relation subtypes. We recommend not positing a type ; for each lexical relation, but rather using the feature PRED ; to distinguish different lexical relations of the same type. ; Relation types are modified in one of two circumstances: ; ; (i) A feature needs to be introduced that is relevant for some ; relations and not others, or ; ; (ii) Something in the grammar needs to make reference to a family ; of relations that are not otherwise distinguished by a type. arg0-relation := relation & [ ARG0 individual ]. arg1-relation := arg0-relation & [ ARG1 semarg ]. arg12-relation := arg1-relation & [ ARG2 semarg ]. arg123-relation := arg12-relation & [ ARG3 semarg ]. arg1234-relation := arg123-relation & [ ARG4 semarg ]. event-relation := arg0-relation & [ ARG0 event ]. arg1-ev-relation := arg1-relation & event-relation. arg12-ev-relation := arg1-ev-relation & arg12-relation. arg123-ev-relation := arg12-ev-relation & arg123-relation. arg1234-ev-relation := arg123-ev-relation & arg1234-relation. ; Noun relations noun-relation := arg0-relation & [ ARG0 ref-ind ]. ; Relational nouns like 'picture' or 'claim' take an additional semantic ; argument noun-arg1-relation := noun-relation & arg1-relation. ; (ERB 2004-1-14) Change to make number names analysis possible. ; I'll try to propagate this change into the main source for the matrix. const-value-relation := relation & [ CARG *top* ]. ; (MS 2005-07-18) In order to get the generics entries into the grammar, ; CARG should be *top* instead of string named-relation := noun-relation & const-value-relation & [ PRED named_rel, CARG *top* ]. ; Preposition relations prep-mod-relation := arg12-ev-relation. ; adverb relations ; NB: Negation is represented not as a subtype of adv-relation, but as an ; adv-relation with the PRED value neg_rel. adv-relation := arg0-relation. ; coordinating and subordinating conjunctions ; (MS 2004-06-24) changed the handle to semarg, otherwise it won't scope ; in n compounds. subord-or-conj-relation := relation & [ L-HNDL semarg, R-HNDL semarg ]. ;;; (FCB 2006-06-02) changed to allow for event conjunction conjunction-relation := subord-or-conj-relation & arg0-relation & [ L-INDEX event-or-ref-index, R-INDEX event-or-ref-index ]. ; NB: "if_then_rel" is now a PRED value of subord-relation. ; currently it is sconjunction relation FCB subord-relation := subord-or-conj-relation. ; noun noun compounds unspec-compound-relation := arg12-relation & [ ARG0 event, ARG1 ref-ind, ARG2 ref-ind ]. ; quantifier relation quant-relation := arg0-relation & [ ARG0 ref-ind, RSTR handle, BODY handle ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; predsorts norm_rel := predsort. named_rel := norm_rel. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Head types ; Values for head features such as CASE, VFORM, ... ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Sorts for atomic values ; person, number and gender ; clause mode ; voice ; mood ; pronoun type ; Three-valued sort evoking Polish logician Jan Lukasiewicz luk := sort. ; These types allow the statement of constraints (e.g., in ; subcategorization) of the form: If you care, you must have ; the value + (-), but you don't have to care. Useful for keeping ; down the number of constructions and subcategorization types. na-or-+ := luk. na-or-- := luk. +-or-- := luk. na := na-or-+ & na-or--. bool := luk. + := bool & na-or-+ & +-or--. - := bool & na-or-- & +-or--. ; Three-valued sort for distinguishing unmodified signs from both ; left-modified and right-modified signs PERIPH indicates whether this ; modifier is left- or right-peripheral in its phrase - e.g., "the IBM ; temporary employees" but "*the IBM five employees" xmod := sort & [ PERIPH luk ]. notmod-or-rmod := xmod. notmod-or-lmod := xmod. notmod := notmod-or-rmod & notmod-or-lmod. hasmod := xmod. lmod := hasmod & notmod-or-lmod. rmod := hasmod & notmod-or-rmod. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Basic types sort := *top*. predsort := sort. atom := predsort. no-pred := predsort. avm := *top*. list := avm. cons := list & [ FIRST *top*, REST *top* ]. 0-1-list := list. 1-list := 0-1-list & cons & [ REST null ]. null := 0-1-list. 1-plus-list := cons & [ REST cons ]. diff-list := avm & [ LIST list, LAST list ]. 0-1-dlist := diff-list & [ LIST 0-1-list ]. 0-dlist := 0-1-dlist & [ LIST #list, LAST #list ]. 1-dlist := 0-1-dlist & [ LIST 1-list & [ REST #rest & null ], LAST #rest ]. ; This type shows the basic form for diff-list appends. ; It is not meant to be used as a supertype. Actual instances ; of diff-list append will involve different features in different ; relationships to each other & the feature geometry. dl-append := avm & [APPARG1 [LIST #first, LAST #between], APPARG2 [LIST #between, LAST #last], RESULT [LIST #first, LAST #last]]. integer := atom. ; NB: strings should be enclosed in double quotes, e.g., [PRED "named_rel"]. ;string := atom. ; (MS 2004-06-14) Added values for cfrom and cto to get the character ; positions in the RMRS (parallel to ERG). Therefore, string has to be redefined. initial-cfrom-val := atom. initial-cto-val := atom. string := initial-cfrom-val & initial-cto-val. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Some useful kinds of lists ; A list of optional arguments. olist := list. ocons := olist & cons & [ FIRST unexpressed & [ OPT + ], REST olist ]. onull := olist & null. ; The LinGO grammar also makes use of a prolist -- or list ; of synsems of type pro-ss. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Lexical rules ; Grammars should be monotonic in their construction of semantic ; representations. That is, as the tree is built, no relations should ; ever be thrown away. This has implications for the way lexical rules ; are written. If two forms are related to each other, and one has ; more semantic relations than the other, it has to be the output. ; We are interested in cases where this constraint is or appears to ; be problematic. ; ; added IDIOM (CH) ; lex-rule := phrase-or-lexrule & word-or-lexrule & [ IDIOM #idiom, NEEDS-AFFIX bool, SYNSEM.LOCAL.CONT [ RELS [ LIST #first, LAST #last ], HCONS [ LIST #hfirst, LAST #hlast ] ], DTR #dtr & word-or-lexrule & [ SYNSEM.LOCAL.CONT [ RELS [ LIST #first, LAST #middle ], HCONS [ LIST #hfirst, LAST #hmiddle ] ], ALTS #alts, IDIOM #idiom], C-CONT [ RELS [ LIST #middle, LAST #last ], HCONS [ LIST #hmiddle, LAST #hlast ]], ALTS #alts, ARGS < #dtr > ]. ; Lexical rules vary on two dimensions: whether they are lexeme-to-lexeme ; or lexeme-to-word and whether or not they involve spelling changes. ; Accordingly, we define four subtypes of lex-rule, which have ; four cross-classified glb subtypes: ; Note that the lexeme/word distinction is represented via a feature ; [INFLECTED bool] rather than as a type. We find this more convenient, ; as it allows certain words to be [INFLECTED +] from the start without ; having to twist the hierarchy too much (especially if one makes use ; of defaults). ; Lexeme-to-word rules are hypothesized to monotonically add synsem ; information. lexeme-to-word-rule := lex-rule & [ INFLECTED +, KEY-ARG #keyarg, SYNSEM #synsem, ROOT #root, DTR [ INFLECTED -, KEY-ARG #keyarg, SYNSEM #synsem, ROOT #root ], C-CONT.RELS ]. ; Lexeme-to-lexeme rules can make more radical changes to the SYNSEM value. lexeme-to-lexeme-rule := lex-rule & lexeme & [ INFLECTED #infl, SYNSEM.LOCAL.CAT.MC #mc, DTR [ INFLECTED #infl, SYNSEM.LOCAL.CAT.MC #mc ] ]. ; Spelling changing rules. The LKB identifies these rules based ; on the NEEDS-AFFIX value. inflecting-lex-rule := lex-rule & [ NEEDS-AFFIX + ]. ; Spelling-preserving rules copy up the STEM (orthography) of ; the daughter. constant-lex-rule := lex-rule & [ STEM #stem, DTR [ STEM #stem ]]. ; Cross-classified glb types const-ltol-rule := lexeme-to-lexeme-rule & constant-lex-rule. infl-ltol-rule := lexeme-to-lexeme-rule & inflecting-lex-rule. const-ltow-rule := lexeme-to-word-rule & constant-lex-rule. infl-ltow-rule := lexeme-to-word-rule & inflecting-lex-rule. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Phrase structure rules ; Headed phrases must obey the Head Feature Principle and the Revised ; Marking Principle. They do not all obey the NLFP with respect to ; QUE, but it appears that all CLAUSE phrases account for QUE on ; mother and non-head-dtr. Hence moved the QUE coreference to ; NON-CLAUSE. Headed phrases also identify the value of AGR on mother ; and head daughter, unlike e.g. the coordination schemata which ; identify HEAD but not AGR. ; (MS 2003-12-17) This is the place, where I have to change the Matrix. I need the NONHEAD-DTR already here, because I want to use it in the empty-head-type. headed-phrase := phrase & [ ROOT -, SYNSEM.LOCAL [ CAT.HEAD head & #head, AGR #agr ], HEAD-DTR.SYNSEM.LOCAL local & [ CAT.HEAD #head, AGR #agr ], NON-HEAD-DTR sign ]. non-headed-phrase := phrase & [ ROOT - ]. ; Most but not all phrases have SYNSEM phr-synsem; head-complement ; constructions have their SYNSEM type determined by the head-dtr. phrasal := phrase & [ SYNSEM phr-synsem ]. ; Head/nexus phrases pass up the REL and QUE values of the head daughter ; (which has amalgamated the REL and QUE values of its arguments as in ; Sag 1997) to the mother. head-nexus-rel-phrase := headed-phrase & [ SYNSEM.NON-LOCAL.REL #rel, HEAD-DTR.SYNSEM.NON-LOCAL.REL #rel ]. head-nexus-que-phrase := headed-phrase & [ SYNSEM.NON-LOCAL.QUE #que, HEAD-DTR.SYNSEM.NON-LOCAL.QUE #que ]. head-nexus-phrase := head-nexus-rel-phrase & head-nexus-que-phrase. ; In a head/local dependent phrase, the SLASH feature of the mother is ; token-identical to that of the head daughter, which has already amalgamated ; the SLASH values of its arguments. See discussion of head-nexus-phrase for ; treatment of REL and QUE. head-valence-phrase := head-nexus-phrase & [ SYNSEM.NON-LOCAL.SLASH #slash, HEAD-DTR.SYNSEM.NON-LOCAL.SLASH #slash ]. ; All phrases are either unary or binary. ;;; ;;; Idiom Implementation (CH 060804) ;;; basic-unary-phrase := phrase & [ STEM #stem, IDIOM #idiom, SYNSEM.LOCAL.CONT [ RELS [ LIST #first, LAST #last ], HCONS [ LIST #scfirst, LAST #sclast ] ], C-CONT [ RELS [ LIST #middle, LAST #last ], HCONS [ LIST #scmiddle, LAST #sclast ] ], ARGS < sign & [ STEM #stem, SYNSEM.LOCAL local & [ CONT [ RELS [ LIST #first, LAST #middle ], HCONS [ LIST #scfirst, LAST #scmiddle ] ] ], ROOT -, IDIOM #idiom] > ]. unary-phrase := basic-unary-phrase & [ INFLECTED +, ARGS < [ INFLECTED + ] > ]. ;;; ;;; Idiom Implementation (CH 060804) ;;; basic-binary-phrase := phrase & [ IDIOM #idiom, SYNSEM.LOCAL.CONT [ RELS [ LIST #first, LAST #last ], HCONS [ LIST #scfirst, LAST #sclast ] ], C-CONT [ RELS [ LIST #middle2, LAST #last ], HCONS [ LIST #scmiddle2, LAST #sclast ] ], ARGS < sign & [ IDIOM #idiom, SYNSEM.LOCAL local & [ CONT [ RELS [ LIST #first, LAST #middle1 ], HCONS [ LIST #scfirst, LAST #scmiddle1 ] ] ], ROOT - ], sign & [ IDIOM #idiom, SYNSEM.LOCAL local & [ CONT [ RELS [ LIST #middle1, LAST #middle2 ], HCONS [ LIST #scmiddle1, LAST #scmiddle2 ] ] ], ROOT - ] > ]. ; basic-binary-phrase := phrase & ; [ SYNSEM.LOCAL.CONT [ RELS [ LIST #first, ; LAST #last ], ; HCONS [ LIST #scfirst, ; LAST #sclast ] ], ; C-CONT [ RELS [ LIST #middle2, ; LAST #last ], ; HCONS [ LIST #scmiddle2, ; LAST #sclast ] ], ; ARGS < sign & [ SYNSEM.LOCAL local & ; [ CONT [ RELS [ LIST #first, ; LAST #middle1 ], ; HCONS [ LIST #scfirst, ; LAST #scmiddle1 ] ] ], ; ROOT - ], ; sign & [ SYNSEM.LOCAL local & ; [ CONT [ RELS [ LIST #middle1, ; LAST #middle2 ], ; HCONS [ LIST #scmiddle1, ; LAST #scmiddle2 ] ] ], ; ROOT - ] > ]. binary-phrase := basic-binary-phrase & [ INFLECTED +, ARGS < [ INFLECTED + ], [ INFLECTED + ] > ]. basic-binary-headed-phrase := headed-phrase & basic-binary-phrase & [ NON-HEAD-DTR sign ]. binary-headed-phrase := basic-binary-headed-phrase & binary-phrase. ; For more effecient parsing, designate one argument or the other ; as the KEY-ARG: that which should be unified with first. binary-rule-left-to-right := rule & [ ARGS < [ KEY-ARG + ] , [ KEY-ARG bool ] > ]. binary-rule-right-to-left := rule & [ ARGS < [ KEY-ARG bool ], [ KEY-ARG + ] > ]. head-only := unary-phrase & headed-phrase & [ HEAD-DTR #head, ARGS < #head > ]. head-initial := binary-headed-phrase & [ HEAD-DTR #head, NON-HEAD-DTR #non-head, ARGS < #head, #non-head > ]. basic-head-final := basic-binary-headed-phrase & [ HEAD-DTR #head, NON-HEAD-DTR #non-head, ARGS < #non-head, #head > ]. head-final := basic-head-final & binary-headed-phrase. ; C-CONT is the semantic contribution of the phrase itself. The hook ; of the phrase is identified with the hook of C-CONT (which is possibly ; but not necessarily identified with the hook of one of the daughters. ; The rels of the phrase result from appending the rels of C-CONT and the ; rels of the daughters. ; Head-compositional phrases identify the syntactic head daughter as the ; semantic head. head-compositional := headed-phrase & [ C-CONT.HOOK #hook, HEAD-DTR.SYNSEM.LOCAL.CONT.HOOK #hook ]. ; Clauses have message types as values, non-clauses have the value no-msg. ; Constrain the HEAD value of clause to verb or whatever type is ; appropriate. Clauses have empty QUE values. ; Later versions of the Matrix might have clause v. non-clause as ; an independent dimension from headed v. non-headed phrase, as in ; Ginzburg & Sag 2000. The phrase types are meant to cross-classify ; with the clause types to give e.g., decl-head-subj from decl-clause ; and head-subj-phrase. non-clause := head-nexus-phrase & [ SYNSEM.LOCAL.CAT.MC na ]. clause := phrasal & [ SYNSEM [ LOCAL.CAT.VAL.COMPS olist, NON-LOCAL.QUE 0-dlist ] ]. ; The following subtypes of clause will need more constraints, ; as appropriate: ; Relative clauses are propositions, but depending on the analysis ; of the construction, the message may actually come from the daughter. ; ERB 2007-01-21 Adding constraint that should specialize prop-or-ques ; to prop as value of SF. (See notes at interrogative-clause.) interrogative-clause := clause & [ SYNSEM.LOCAL.CONT.HOOK.INDEX.SF ques ]. declarative-clause := clause & [ SYNSEM.LOCAL.CONT.HOOK.INDEX.SF prop-or-ques ]. imperative-clause := clause & [ SYNSEM.LOCAL.CONT.HOOK.INDEX.SF comm ]. basic-head-filler-phrase := binary-phrase & phrasal & [ SYNSEM [ LOCAL [ CAT [ VAL [ COMPS < >, SPR < anti-synsem > ], POSTHEAD + ] ], NON-LOCAL.SLASH 0-dlist ], ARGS < [ SYNSEM [ LOCAL #slash & local & [ CAT.VAL [ SUBJ olist, COMPS olist, SPR olist ], CTXT.ACTIVATED + ], NON-LOCAL.SLASH 0-dlist ] ], [ SYNSEM [ LOCAL.CAT [ VAL.COMPS olist ], NON-LOCAL [ SLASH 1-dlist & [ LIST [ FIRST #slash, REST < > & #last ], LAST #last ], QUE 0-dlist, REL 0-dlist ] ] ] > ]. ; These phrase types should all inherit from head-final or head-initial, ; as appropriate, replacing binary-headed-phrase. basic-head-subj-phrase := head-valence-phrase & binary-headed-phrase & [ SYNSEM.LOCAL.CAT [ POSTHEAD +, VAL [ SUBJ olist & < anti-synsem >, COMPS < >, SPR #spr ] ], HEAD-DTR.SYNSEM.LOCAL.CAT [ VAL [ SUBJ < #synsem >, SPR #spr, COMPS olist ], MC na ], NON-HEAD-DTR.SYNSEM #synsem & canonical-synsem & [ LOCAL [ CAT [ VAL [ SUBJ olist, COMPS olist, SPR olist ] ] ], NON-LOCAL [ SLASH 0-dlist & [ LIST < > ], REL 0-dlist, QUE 0-dlist ] ] ]. basic-head-spec-phrase := head-valence-phrase & non-clause & phrasal & binary-headed-phrase & [ INFLECTED +, SYNSEM [ LOCAL.CAT [ VAL [ SUBJ #subj, COMPS #spcomps, SPR #spr, SPEC #spec ], POSTHEAD #ph ], MODIFIED #modif ], HEAD-DTR [ INFLECTED +, SYNSEM [ LOCAL [ CAT [ HEAD #head, VAL [ SUBJ #subj, COMPS olist & #comps, SPR < #synsem & canonical-synsem . #spr >, SPEC #spec ], POSTHEAD #ph ], CONT.HOOK #hdhook ], MODIFIED #hmodif ] ], NON-HEAD-DTR.SYNSEM #synsem & [ LOCAL [ CAT [ VAL [ SPEC < [ LOCAL [ CAT [ HEAD #head, VAL.COMPS #comps ], CONT.HOOK #hdhook ], MODIFIED #hmodif ] >, COMPS #spcomps ] ], CONT.HOOK #hook ], MODIFIED #modif ], C-CONT [ HOOK #hook, RELS , HCONS ] ]. ; Value of LIGHT comes from head-daughter's specification in HC-LIGHT. ; ERB (2005-08-10) Change value of SYNSEM from canonical-synsem to ; phr-synsem-min, so that LKEYS is not an appropriate feature. ; ERB (2005-08-12) We need to copy of HC-LIGHT as well, for cases ; where there are multiple complements. basic-head-comp-phrase := head-valence-phrase & head-compositional & binary-headed-phrase & [ SYNSEM canonical-synsem & [ LOCAL.CAT [ MC #mc, VAL [ SUBJ #subj, COMPS #comps, SPR #spr ], POSTHEAD #ph ], LEX #lex ], HEAD-DTR.SYNSEM [ LOCAL.CAT [ MC #mc, VAL [ SUBJ #subj, COMPS < #synsem . #comps >, SPR #spr ], POSTHEAD #ph ], LEX #lex ], NON-HEAD-DTR.SYNSEM #synsem & canonical-synsem, C-CONT [ RELS , HCONS ] ]. ; Skip an optional complement as long as there is still another obligatory ; complement on the list. Two subtypes allow for one or two optional ; complements before an obligatory one. basic-head-opt-comp-phrase := head-valence-phrase & basic-unary-phrase & head-compositional & [ INFLECTED #infl, SYNSEM canonical-synsem & [ LOCAL.CAT [ VAL [ SUBJ #subj, SPR #spr, SPEC #spec ], MC #mc, POSTHEAD #ph ], MODIFIED #mod ], HEAD-DTR #head & [ INFLECTED #infl, SYNSEM [ LOCAL.CAT [ VAL [ SUBJ #subj, SPR #spr, SPEC #spec ], MC #mc, POSTHEAD #ph ], MODIFIED #mod ] ], C-CONT [ RELS , HCONS ], ARGS < #head > ]. basic-head-opt-one-comp-phrase := basic-head-opt-comp-phrase & [ SYNSEM.LOCAL.CAT.VAL.COMPS #comps, HEAD-DTR [ INFLECTED +, SYNSEM.LOCAL [ CAT.VAL.COMPS < unexpressed & [ OPT + ] . #comps & < expressed-synsem, ... > >, CONT.HOOK.INDEX event ] ] ]. basic-head-opt-two-comp-phrase := basic-head-opt-comp-phrase & [ SYNSEM.LOCAL.CAT.VAL.COMPS #comps, HEAD-DTR [ INFLECTED +, SYNSEM.LOCAL [ CAT.VAL.COMPS < unexpressed & [ OPT + ] . < unexpressed & [ OPT + ] . #comps & < expressed-synsem, ... > > >, CONT.HOOK.INDEX event ] ] ]. ; Unary rules for extraction basic-extracted-arg-phrase := head-valence-phrase & head-only & [ SYNSEM.LEX - ]. basic-extracted-comp-phrase := basic-extracted-arg-phrase & head-compositional & [ SYNSEM canonical-synsem & [ LOCAL.CAT [ VAL [ SUBJ #subj, SPR #spr, COMPS #comps ], MC #mc ] ], HEAD-DTR [ SYNSEM [ LOCAL.CAT [ VAL [ SUBJ #subj, SPR #spr, COMPS < gap & [ NON-LOCAL.SLASH #slash ] . #comps > ], MC #mc ], NON-LOCAL.SLASH #slash ] ], C-CONT [ RELS , HCONS ] ]. ; ERB 2004-08-26 Remove [MC -] on mother; probably specific ; to analysis of subject extraction for English. basic-extracted-subj-phrase := basic-extracted-arg-phrase & [ SYNSEM.LOCAL.CAT.VAL [ SUBJ < >, SPR < >, COMPS < > ], HEAD-DTR.SYNSEM [ LOCAL.CAT [ VAL [ SUBJ < gap & [ LOCAL #local & local & [ CONT.HOOK.INDEX ref-ind ] ] >, COMPS olist ], MC na ], NON-LOCAL.SLASH.LIST < #local > ] ]. head-mod-phrase := head-nexus-phrase & [ SYNSEM [ LOCAL.CAT.VAL [ SUBJ #subj, SPR #spr, COMPS < > ], MODIFIED hasmod ], HEAD-DTR.SYNSEM [ LOCAL.CAT.VAL [ SUBJ #subj, SPR #spr, COMPS olist ], NON-LOCAL [ REL 0-dlist ] ] ]. basic-extracted-adj-phrase := head-mod-phrase & head-only & phrasal. extracted-adj-phrase := basic-extracted-adj-phrase & [ SYNSEM [ LOCAL.CAT [ POSTHEAD #ph, MC #mc ], NON-LOCAL.SLASH 1-dlist & ], VAL [ SUBJ olist, COMPS olist, SPR olist ] ] ] !> ], HEAD-DTR.SYNSEM canonical-synsem & [ LOCAL local & [ CAT [ HEAD #head, VAL #val & [ SUBJ < synsem-min & [ NON-LOCAL.SLASH 0-dlist ] > ], POSTHEAD #ph, MC #mc ], CONT.HOOK #hook, CTXT #ctxt ], NON-LOCAL.SLASH 0-dlist, MODIFIED notmod ], C-CONT [ HOOK #hook, HCONS ] ]. basic-head-mod-phrase-simple := head-mod-phrase & binary-headed-phrase & [ SYNSEM [ LOCAL.CAT.MC #mc, NON-LOCAL [ SLASH [ LIST #first, LAST #last ], REL 0-dlist ] ], HEAD-DTR.SYNSEM [ LOCAL [ CAT [ HEAD #head, VAL #val, POSTHEAD #ph, MC #hmc ], AGR #agr, CONT.HOOK #hdhook ], NON-LOCAL #nonloc & [ SLASH [ LIST #middle, LAST #last ] ], MODIFIED #modif ], NON-HEAD-DTR.SYNSEM [ LOCAL.CAT [ HEAD [ MOD < [ LOCAL local & [ CAT [ HEAD #head, VAL #val, POSTHEAD #ph, MC #hmc ], AGR #agr, CONT.HOOK #hdhook ], NON-LOCAL #nonloc, MODIFIED #modif ] > ], VAL [ COMPS olist, SPR olist ], MC #mc ], NON-LOCAL [ SLASH [ LIST #first, LAST #middle ], QUE 0-dlist & [ LIST null ] ] ], C-CONT.RELS ]. head-mod-phrase-simple := basic-head-mod-phrase-simple & [ HEAD-DTR.SYNSEM.LOCAL.CONT.HOOK.LTOP #htop, NON-HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD.MOD < [ LOCAL.CONT.HOOK.LTOP #htop ] >]. adj-head-phrase := basic-head-mod-phrase-simple & head-final & [ SYNSEM [ LOCAL.CAT.POSTHEAD #ph, MODIFIED lmod & [ PERIPH #periph ], LEX #lex ], HEAD-DTR.SYNSEM [ LOCAL.CAT.POSTHEAD #ph, LEX #lex ], NON-HEAD-DTR.SYNSEM [ LOCAL.CAT [ VAL.COMPS < > ], NON-LOCAL [ SLASH 0-dlist, REL 0-dlist ], MODIFIED.PERIPH #periph ] ]. head-adj-phrase := basic-head-mod-phrase-simple & head-initial & phrasal & [ SYNSEM [ LOCAL.CAT.POSTHEAD +, MODIFIED rmod ], HEAD-DTR.SYNSEM.MODIFIED notmod-or-rmod, NON-HEAD-DTR.SYNSEM [ LOCAL.CAT.POSTHEAD +, NON-LOCAL.QUE 0-dlist ] ]. ; We split head-adj-phrase and adj-head-phrase into two each, ; one for intersective modifiers and one for scopal modifiers, in order to ; get desired results for recursive modification as in "apparently difficult ; problem" (cf. Kasper '98). This split is also used in generation, where ; we delay construction of intersective modification, but not scopal. scopal-mod-phrase := head-mod-phrase-simple & [ NON-HEAD-DTR.SYNSEM.LOCAL [ CAT.HEAD.MOD < [ LOCAL scopal-mod ] >, CONT.HOOK #hook ], C-CONT [ HOOK #hook, HCONS ] ]. isect-mod-phrase := head-mod-phrase-simple & head-compositional & [ HEAD-DTR.SYNSEM.LOCAL.CONT.HOOK.LTOP #hand, NON-HEAD-DTR.SYNSEM.LOCAL [ CAT.HEAD.MOD < [ LOCAL intersective-mod ] >, CONT.HOOK.LTOP #hand ], C-CONT.HCONS ]. adj-head-scop-phrase := adj-head-phrase & scopal-mod-phrase & [ NON-HEAD-DTR.SYNSEM.LOCAL.CAT.POSTHEAD - ]. head-adj-scop-phrase := head-adj-phrase & scopal-mod-phrase & [ NON-HEAD-DTR.SYNSEM.NON-LOCAL.REL 0-dlist ]. adj-head-int-phrase := adj-head-phrase & isect-mod-phrase & [ NON-HEAD-DTR.SYNSEM.LOCAL.CAT [ POSTHEAD - ] ]. head-adj-int-phrase := head-adj-phrase & isect-mod-phrase.