;; -*- Mode: TDL; Coding: utf-8 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; file: japgram
;;; module:
;;; version: %I%
;;; written by: Melanie Siegel/Emily Bender
;;; last update: %G% --- %U%
;;; updated by:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; author | date | modification
;;; ------------------|-------------|------------------------------------------
;;;Melanie Siegel (MS)| | Emily Bender (ERB), Francis Bond (FCB),
;;; | | Chikara Hashimoto (CH),
;;; | | Takaaki Tanaka (TT), Akira Ohtani (AO),
;;; | | Michael Goodman(MWG)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Rules for sentence chains or single sentences
;declarative sentence, finite verb
; (do-parse-tty "食べる")
utterance_rule-decl-finite := utterance-sf-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD decl,
C-CONT.HOOK.INDEX.SF prop,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
FIN +],
NON-LOCAL.QUE ]].
;wh-question without ka
; (do-parse-tty "何 を 食べる")
utterance_rule-wh-without-ka := utterance-sf-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD quest,
C-CONT.HOOK.INDEX.SF ques,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
FIN +],
NON-LOCAL.QUE ]].
; Imperative (request) て
; set SF to comm[and]
; quite informal/conversational => ROBUST +
; (do-parse-tty "食べ て")
; added J-POSTHEAD coord to block te-adjunct
; FIXME, I would prefer the tense to be present, not te
; C-CONT.HOOK.INDEX.E.TENSE present,
utterance_rule-imp := utterance-sf-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD imp,
C-CONT.HOOK.INDEX.SF comm,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
FIN -,
H-TENSE te,
VN -,
COP -,
J-SPEC 1-list,
J-POSTHEAD coord],
NON-LOCAL [QUE ,
ROBUST +]]].
; (ERB 2002-01-14) Don't want VN+kudasai to use this one anymore,
; so adding SMOD imp.
; (MS 2002-01-16) introduces simple-imperative vs. polite-imperative to divide utterance_rule10 and utterance_rule2e.
; (MS 2003-12-17) Adapting to Matrix 0.6
; (MS 2005-12-08) We don't want the NONLOCAL.QUE condition on the argument, as embedded sentences; could have some QUE left in their storage: "誰が行くか教えて下さい。"
; EX: (do-parse-tty "食べ て 下さい")
; EX: (do-parse-tty "食べ て なさい") FIXME (one bad parse)
; (FCB 2009-01-05) Taking out the MOOD, as we don't need it and it stops generation.
; put it back in due to spurious ambiguity with (do-parse-tty "食べ ます")
utterance_rule-command := utterance-sf-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD imp,
C-CONT.HOOK.INDEX.SF comm,
ARGS.FIRST [SYNSEM [LOCAL [CAT.HEAD [MODUS simple-imperative,
H-TENSE present,
FIN +],
CONT.HOOK.INDEX.E.MOOD imperative],
NON-LOCAL.QUE ],
RMORPH-BIND-TYPE imp-morph]].
; (MS 2004-12-14) an utterance rule for sentences with an infinite ending, like "偽りなく",
; at the moment restricted to adjectives.
;;; FIXME --- move to Fragments
utterance_rule-decl-infinite := utterance-sf-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD decl,
C-CONT.HOOK.INDEX.SF prop,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
H-TENSE te,
FIN -,
ADJ +,
VN -,
COP -],
NON-LOCAL [QUE ,
ROBUST +]]].
;sentence with sentence end particle, finite verb
; (FCB 2006-05-09) Pass up SMOD, assume particle sets the mood
; this allows many rules to be collapsed
utterance_rule-sep := utt-sep-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD #1,
ARGS.FIRST.SYNSEM.LOCAL.CAT.HEAD.SMOD #1].
; (ERB 2001-11-05) These idioms probably shouldn't get the prpstn_rel.
; Also, this was turing up with unbound HCONS lists.
;;; FIXME: doesn't scope, harmonize with ERG (FCB 2006-05-08)
;;; (do-parse-tty "お早う")
utterance_rule-idiom := utt-idiom-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD decl].
;; end of utterances
; (ERB 2001-10-03) Rule that adds unspec-loc-rel to temporal
; nouns, and makes them modifiers.
adv_np_rule := adv_np_rule-type.
; (FCB 2005-06-30) moved supertype into rule-types.
;compound-noun-rule := compound-noun-rule-type &
; [SYNSEM.LOCAL.CAT.HEAD.MOD < [LOCAL.CAT.HEAD ordinary-or-date-noun_head] > ].
;expanded from ordinary_noun_head to noun_head: dore kurai.
; (ERB 2001-10-10) For constructing k2ys it's helpful to have
; the unspecified relation between nouns in an nn compound not
; be an instance of prep_mod_rel.
; (ERB 2001-10-29) Trying to keep integers promoted to NumClPs
; promoted to NPs out of this rule. Trying the hack of giving them a
; REL value that is not a string. So, constraining this guy to
; be REL string.
; (ERB 2001-10-29) The REL names, written 'relation, are actually
; treated as atoms, not strings, by cheap. This means I need to
; move this contrast one level up.
; (MS 2001-11-26) Changed the modification from ordinary-noun_head to noun_head in order to allow compounds with exceptional nouns (mitai).
; (MS 2001-12-19) This solution gave too many ambiguities. I'll introduce a special rule for exceptional nouns.
; (ERB 2001-11-26) Like other modifiers, this should grab the MOD-IND
; and MOD-HAND.
; (ERB 2001-11-26) But it should pass up the LTOP and INDEX of its MOD value.
; (ERB 2001-11-26) Experimenting (as we so desire) with using
; a prep-mod-rel again here to allow compounds with nominalizations
; as the head.
; (ERB 2001-11-28) I don't think we need to worry about the INDEX and
; LTOP on the mother here. These only show up as non-head daughters of the
; compounds-rule, which is an intersective head-adj rule and therefore
; takes the head daugther as the semantic head.
; (ERB 2001-12-03) ARG3 should be the INDEX of the daughter, not
; the MOD-IND.
; (ERB 2002-01-28) MOD...HEAD is ordinary-or-date-noun_head to allow
; nouns like TOKI as head of compounds. (Was just ordinary_noun_head)
; (MS 2002-06-11) The POSTHEAD is unified with the POSTHEAD of the argument. Thus, I can prevent
; words like 間 from being the first argument in a compound.
; (MS 2003-09-26) Changed no_nmod to unspec-compound-relation, as defined in Matrix.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; (MS 2005-04-11) If the LKEYS.KEYREL.PRED is atom, we cannot parse more than two nouns in a compound.
; So, I'll take this restriction out.
;compound-noun-rule := empty-head-type &
;[SYNSEM [LOCAL [CAT [HEAD empty-nmod-p_head &
; [MOD < [LOCAL [CAT [HEAD ordinary-or-date-noun_head,
; VAL.SPR 1-list],
; CONT.HOOK [LTOP #hhand,
; INDEX #hinst]],
; MODIFIED.PERIPH -]>,
; J-POSTHEAD #ph],
; VAL saturated],
; BAR -],
; MODIFIED.PERIPH +],
; C-CONT [RELS ,
; HCONS ],
; HEAD-DTR.SYNSEM [LOCAL [CONT nncompound-sem-type &
; [RELS ,
; HCONS ]],
; LKEYS.KEYREL #key & unspec-compound-relation &
; [LBL #hhand,
; PRED "no",
; ARG0.E.TENSE no_tense,
; ARG2 #hinst,
; ARG1 #nhinst]],
; NON-HEAD-DTR.SYNSEM [LOCAL [CAT [HEAD noun_head & [J-POSTHEAD #ph],
; VAL saturated],
; CONT [ HOOK.INDEX #nhinst],
; BAR -]]].
; (MS 2003-09-26) Changed no_nmod to unspec-compound-relation, as defined in Matrix.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
;compound-exceptional-noun-rule := empty-head-type &
;[SYNSEM [LOCAL [CAT [HEAD empty-nmod-p_head & [MOD < [LOCAL [CAT [HEAD exceptional_noun_head,
; VAL.SPR 1-list],
; CONT.HOOK [LTOP #hhand,
; INDEX #hinst]],
; MODIFIED.PERIPH -] > ],
; VAL saturated],
; BAR -],
; MODIFIED.PERIPH +],
; C-CONT [RELS ,
; HCONS ],
; HEAD-DTR.SYNSEM [LOCAL [CONT nncompound-sem-type &
; [RELS ,
; HCONS ]],
; LKEYS.KEYREL #key & unspec-compound-relation &
; [LBL #hhand,
; PRED "no",
; ARG0.E.TENSE no_tense,
; ARG2 #hinst,
; ARG1 #nhinst]],
; NON-HEAD-DTR.SYNSEM [LOCAL [CAT [HEAD noun_head,
; VAL saturated],
; CONT [ HOOK.INDEX #nhinst],
; BAR -],
; LKEYS.KEYREL.PRED atom]].
; (ERB 2001-11-28) Grab MOD-IND and MOD-HAND.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; (MS 2005-03-15) Grab CONT.HOOK.INDEX instead of LKEYS.KEYREL.ARG0!
;compound-name-rule := empty-head-type &
; [SYNSEM [LOCAL [CAT [HEAD empty-nmod-p_head & [MOD < [LOCAL [CAT [HEAD name_head,
; VAL.SPR 1-list],
; CONT.HOOK [LTOP #hhand,
; INDEX #hinst]],
; MODIFIED.PERIPH -] > ],
; VAL saturated],
; BAR -],
; MODIFIED.PERIPH +],
; C-CONT [RELS ,
; HCONS ],
; HEAD-DTR.SYNSEM [LOCAL [CONT appos-id-sem-type &
; [RELS ,
; HCONS ]],
; LKEYS.KEYREL #key &
; [LBL #hhand,
; ARG0 event,
; ARG1 #nhinst,
; ARG2 #hinst]],
; NON-HEAD-DTR.SYNSEM [LOCAL [CAT [HEAD name_head,
; VAL saturated],
; CONT.HOOK.INDEX #nhinst,
; BAR -]]].
; (ERB 2001-08-06) Disallowing numbers from compounds.
; (ERB 2001-08-21) Changed type nonint_head to final_head.
; (ERB 2001-09-13) Changed type from head-adjunct-rule1-type to head-adjunct-rule-final,
; since I'm trying to get rid of head-adjunct-rule1-type. This looses the constraint
; that the mother's INDEX is identified with the non-head dtr's INDEX, so I'm adding
; that in here.
; (MS 2001-10-17) Taking the saturated restriction on the head-dtr out, such that it is possible to
; add a determiner to the compound.
; (ERB 2001-11-26) I don't want the INDEX/LTOP to be identified
; with MOD-IND/MOD-HAND on the mother of this rule, because it
; may be headed by a nominalization. As a first stab, say that
; INDEX and LTOP come from NON-HEAD-DTR and MOD-IND/MOD-HAND come
; from HEAD-DTR.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (TT 2003-08-05) add "J-POSTHEAD right"
; (TT 2003-08-27) delete "J-POSTHEAD right" because it disabled lkb to parse NNN.
; (MS 2005-07-04) so, let's try with J-POSTHEAD compound
; (FCB 2006-06-06) moved the meat into rule-types.
compounds-rule := compound-rule.
;;;;;;;;;;;;;;;;;;;;;;;;N-> QUANTIFIED N;;;;;;;;;;;;;;;;;;;;
; (ERB 2001-08-16) Changed the following:
;
; ARGS.FIRST.SYNSEM.LOCAL.CONT.KEY.LBL #h
;
; to
;
; ARGS.FIRST.SYNSEM.LOCAL.CONT.LBL #h
;
; So that it works properly with NumCl phrases.
; (ERB 2001-09-19) Somewhat surprisingly, this isn't restricted
; to things that are LEX +. For the moment, I'll just have it
; copy up the LEX value. Perhaps it should be restricted to
; LEX + daughters.
; (ERB 2001-09-20) Of course it can't be restricted to things
; that are LEX +, because it has to apply to NumCl phrases that
; are built up of an integer and a NumCl. But copying up the
; LEX value is still a good idea.
; (ERB 2001-09-24) Experimenting with forcing this to apply
; after all other valence requirements are satisfied. (I'm
; getting spurious ambiguity in the date expressions otherwise.)
; (MS 2002-09-05) Inserted UNSAT + on the daughter to prevent the rule to be cyclic (actually a hint from Dan F.)
;;; FCB this shouldn't be a lexical-rule (it applies after syntactic rules)
; (MWG 2008-11-27) Moved to japgram.tdl from lrules.tdl because compounds could
; not be quantified in generation. Compare:
; 死星が帝国の武器である parses, does not generate
; この死星が帝国の武器である parses and generates due to the explicit quantifier
quantify-n-rule := unary-type-super &
[SYNSEM [LOCAL [CAT [ HEAD #head,
VAL super-saturated & [UNSAT -]],
BAR +],
LEX #lex],
C-CONT [HOOK #hook,
RELS ,
HCONS ],
ARGS.FIRST.SYNSEM [LOCAL [CAT [HEAD #head & noun_head,
VAL [UNSAT bool,
SPR opt-1-arg & [FIRST [OPT + ,
LOCAL.CAT.HEAD.KEYS.KEY #rel]],
SUBJ olist,
COMPS olist]],
CONT.HOOK #hook & [LTOP #h,
INDEX #i],
BAR -],
LEX #lex]].
; (TT 2003-08-29) experimental rules for dealing with prefix and suffix correctly
; compounds-rule-nn := hadj-final-i &
; [C-CONT [RELS ,
; HCONS ],
; ARGS <[SYNSEM [LOCAL [CAT [HEAD final_head &
; [
; MAIN-PRD -,
; MOD < [MODIFIED.PERIPH #periph] > ],
; VAL saturated],
; BAR -],
; LEX -]],
; [SYNSEM [LOCAL [CAT [HEAD final_head ],
; BAR -],
; LEX -,
; MODIFIED.PERIPH #periph]]>].
; compounds-rule-prefix-n := hadj-final-i &
; [C-CONT [RELS ,
; HCONS ],
; ARGS <[SYNSEM [LOCAL [CAT [HEAD final_head &
; [J-POSTHEAD left,
; MAIN-PRD -,
; MOD < [MODIFIED.PERIPH #periph] > ],
; VAL saturated],
; BAR -],
; LEX +]],
; [SYNSEM [LOCAL [CAT [HEAD final_head ],
; BAR -],
; LEX -,
; MODIFIED.PERIPH #periph]]>].
; compounds-rule-n-suffix := hadj-final-i &
; [SYNSEM.LOCAL.CAT.HEAD.J-POSTHEAD posthead,
; C-CONT [RELS ,
; HCONS ],
; ARGS <[SYNSEM [LOCAL [CAT [HEAD final_head &
; [
; MAIN-PRD -,
; MOD < [MODIFIED.PERIPH #periph] > ],
; VAL saturated],
; BAR -],
; LEX -]],
; [SYNSEM [LOCAL [CAT [HEAD final_head & [J-POSTHEAD right]],
; BAR -],
; LEX +,
; MODIFIED.PERIPH #periph]]>].
head_subj_rule := head-subject-rule & [SYNSEM.LOCAL.BAR +].
; (ERB 2001-08-06) Splitting this in two for Smith-style number names.
; (MS 2001-11-14) Took the BAR + restriction out in order to make compounds with subcategorizing nouns possible (振込先指定). Let's see if that overgenerates.
; (MS 2001-11-19) It does. Let's take the BAR from the head-dtr.
; (MS 2001-11-20) Still too much ambiguity. Everything is BAR + again.
; (ERB 2002-02-11) Making embedded-question-rule a binary rule, akin
; to head-complement rules because unary version was relying on LKB
; cycle detection to keep from overgenerating. As a result, need to
; block comp-int-lex heads from head-complement-hf-rule. Will do this
; with a hack: require MESSAGE.LIST e-list on head daughter. This hack
; should cease to work round about when it becomes unnecessary: when
; we overhaul the analysis of clauses in this grammar.
; (MS 2003-07-11) Changed the MESSAGE hack now.
hf-complement-rule := head-complement-hf-type &
[SYNSEM [LOCAL.BAR +,
NON-LOCAL.AFFIX #afflist],
HEAD-DTR.SYNSEM [LOCAL [CAT.HEAD final_head,
BAR +],
NON-LOCAL.AFFIX ],
NON-HEAD-DTR.SYNSEM [NON-LOCAL.AFFIX #afflist,
LOCAL.BAR +]].
hi-complement-rule := head-complement-hi-type &
[SYNSEM.LOCAL.BAR +,
HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD init_head].
head-complement-affixbind-rule := head-complement-hf-type &
[SYNSEM [LOCAL.BAR +,
NON-LOCAL.AFFIX 0-dlist ],
ARGS < [SYNSEM.NON-LOCAL.AFFIX 1-dlist &
[LIST [FIRST #aff,
REST < > & #last],
LAST #last]],
[SYNSEM.LOCAL.CAT.HEAD p_head & [PTYPE #aff]] >].
head-complement2-rule := head-complement2-type & [SYNSEM.LOCAL.BAR +].
; (ERB 2001-09-29) I need a 2obl complements rule that works for
; date expressions, so I'm making one general one. Since elements with
; two obligatory complements are barred from the ordinary head-complements
; rules, I don't think there will be any ambiguity introduced.
;kara-made-rule := head-2obl-complements-type &
; [SYNSEM.LOCAL.BAR +,
; ARGS <[SYNSEM.LOCAL.CAT.HEAD noun_head],
; [SYNSEM.LOCAL.CAT.HEAD postp_head & [PTYPE made]]>].
;parenthesis-rule := head-2obl-complements-type &
; [SYNSEM.LOCAL.BAR +,
; ARGS <[SYNSEM.LOCAL.CAT.HEAD noun_head],
; [SYNSEM.LOCAL.CAT.HEAD parent-end_head]>].
;head-2obl-complements-rule := head-2obl-complements-type &
; [ SYNSEM [LOCAL.BAR +,
; NON-LOCAL.QUE ]].
;this is a test: can one say that the modifier must always be saturated?
; (ERB 2001-09-13) Trying to move to a system where there are only two
; HMRs, one for prehead and one for posthead modifiers. The intersective
; modifiers themselves take care of the necessary handle identities.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (ERB 2002-01-02) [NUCL -] on mother - see notes at
; head-adjunct-rule-type.
hf-adj-i-rule := hadj-final-i &
[SYNSEM.LOCAL.BAR +,
C-CONT [RELS ,
HCONS ],
ARGS <[SYNSEM.LOCAL [CAT [HEAD [J-POSTHEAD left,
ADJ -,
MAIN-PRD -],
VAL saturated],
BAR +]],
[SYNSEM synsem & [LOCAL.BAR +]]>].
; (ERB 2001-11-07) I think this is part of analysis of low attachment
; of adverbs wrt ba/tara/etc.
; (ERB 2001-11-28) I think we don't need this anymore with MOD-IND and
; MOD-HAND and separate rules for scopal and intersective modifiers.
; (ERB 2001-09-21) I want to restrict NumClPs made out of intergers only
; (i.e., mother nodes of the empty-cardinal-numcl-rule) to modify plain
; nouns or compound nouns, but not NPs. This is particularly crucial because
; they are posthead modifiers. However, the head-adjunct-rule-2 is requiring
; both daughters to be BAR +. I'm going to try removing the BAR +
; constraint on the head daughter and see what happens.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (MS 2005-09-30) The BAR + status on this gave us problems when having nominal suffixes
; in compounds, such as: "汎用機用"
; (MS 2005-10-18) So, we need prefix and suffix rules.
; (MS 2005-10-06) Playing around with VAL saturated on the second argument, to avoid
; spurious ambiguity in 前年三月
hi-adj-i-rule := hadj-first-i &
[SYNSEM.LOCAL.BAR +,
ARGS <[SYNSEM synsem],
[SYNSEM.LOCAL [CAT [HEAD [J-POSTHEAD right,
MAIN-PRD -],
VAL saturated],
BAR +]]>].
; (ERB 2001-11-28) Rule for scopal modifiers.
; For some reason, 新しい could be the modifier here until I put
; in the constraint [VAL saturated]. I don't see why that should
; change things. (If I type the MOD.LOCAL of everything, it will
; be doubly ruled out, but that's a separate issue.)
hf-adj-s-rule := hadj-final-s &
[SYNSEM.LOCAL [BAR +],
C-CONT [ RELS ,
HCONS ],
ARGS <[SYNSEM.LOCAL [CAT [ HEAD [J-POSTHEAD left,
MAIN-PRD -],
VAL saturated ],
BAR +]],
[SYNSEM synsem &
[LOCAL.BAR +]]>].
; (MS 2003-06-11) Rule for scopal modifiers - head first
; (MS 2005-12-22) Let's try to take the BAR status from the head:
; "探しばかりする"
hi-adj-s-rule := hadj-first-s &
[SYNSEM.LOCAL [BAR #bar],
C-CONT [ RELS ,
HCONS ],
ARGS <[SYNSEM synsem &
[LOCAL.BAR #bar]],
[SYNSEM.LOCAL [CAT [ HEAD [J-POSTHEAD right,
MAIN-PRD -],
VAL saturated ],
BAR +]]>].
; (MS 2005-10-18) Prefixes and suffixes have a different BAR status. When we want a prefixed noun
; to be in a compound, it should not be BAR +: "政界再編成"
prefix-rule := hadj-final-i &
[C-CONT [RELS ,
HCONS ],
ARGS <[SYNSEM.LOCAL [CAT [HEAD noun_mod_head &
[J-POSTHEAD left,
ADJ -,
MAIN-PRD -],
VAL saturated],
BAR -]],
[SYNSEM synsem & [LOCAL [BAR +]]]>].
suffix-rule := hadj-first-i &
[ARGS <[SYNSEM synsem],
[SYNSEM.LOCAL [CAT [HEAD noun_mod_head &
[J-POSTHEAD right,
MAIN-PRD -],
VAL saturated],
BAR -]]>].
; (ERB 2001-11-26) The hallucinated topic-rel should take the MOD-IND
; of the head noun as its ARG3, not the INDEX.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (ERB 2002-01-02) Allowing relative clauses to attach to either
; NP or N'. Need to constrain the quantify-n-infl-rule so that
; it only applies to unmodified elements, to avoid spurious ambiguity.
; (ERB 2002-01-02) [NUCL -] on mother - see notes at
; head-adjunct-rule-type.
; (ERB 2002-01-14) It may be desirable to split the relative clause rule in two
; to prefer low attachment of relative clauses: rel-cl-rule-1 requires a [NUCL
; +] head daughter, while rel-cl-rule-2 requires a [NUCL -] head
; daughter.
;(CH 2003-08-15) 主名詞を関係節のどこにも関連づけない (non gapped)
; *** 2003-08-14 の Melanie Siegel さんの情報に基づく修正 ***
; there are three thing to change on the first daughter:
; 1) MAIN-PRD bool
; 2) NUCL not_fin_conj
; 3) The co-indexing of #adjevent to CONT.HOOK.INDEX instead of ARG0.
;
;(CH 2003-08-22)
; "ARGS.REST.FIRST.SYNSEM.LOCAL.CAT.HEAD noun_head" を追加
; (MS 2004-12-13) This had [ADJ -] on its argument, preventing the correct
; reading for 目が美しい猫.
; (FCB 2005-06-15) Added ARG0 to messages
rel-cl-rule := hadj-final-for-rel-cl-topic &
[SYNSEM.LOCAL [BAR #bar,
NUCL nucl_minus],
C-CONT [RELS ,
HCONS ],
ARGS <[SYNSEM [LOCAL [CAT [HEAD [ADJ bool,
J-POSTHEAD rels,
MAIN-PRD bool],
VAL saturated],
CONT.HOOK [ INDEX #adjevent,
LTOP #adjhand],
BAR +,
NUCL not_fin_conj]]],
[SYNSEM synsem & [LOCAL [CAT.HEAD noun_head,
BAR #bar,
CONT.HOOK.INDEX #ind]]]>].
rel-cl-sbj-gap-rule := rel-cl-gap-rule &
[SYNSEM.NON-LOCAL.UNDERSPEC_ARG -,
ARGS <[SYNSEM.LOCAL.CAT [HEAD.ADJ bool,
VAL [SUBJ opt-1-arg &
[FIRST.LOCAL.CONT.HOOK.INDEX #sbjind],
COMPS zlist]]],
[SYNSEM.LOCAL.CONT.HOOK.INDEX #sbjind ]>].
rel-cl-obj1-gap-rule := rel-cl-gap-rule &
[SYNSEM.NON-LOCAL.UNDERSPEC_ARG -,
ARGS <[SYNSEM.LOCAL.CAT.VAL [SUBJ zlist,
COMPS opt-1-arg &
[FIRST.LOCAL.CONT.HOOK.INDEX #obj1ind,
REST zlist]]],
[SYNSEM.LOCAL.CONT.HOOK.INDEX #obj1ind ]>].
rel-cl-obj2-gap-rule := rel-cl-gap-rule &
[SYNSEM.NON-LOCAL.UNDERSPEC_ARG -,
ARGS <[SYNSEM.LOCAL.CAT.VAL [SUBJ zlist,
COMPS 1-plus-list &
[REST.FIRST.LOCAL.CONT.HOOK.INDEX #obj2ind]]],
[SYNSEM.LOCAL.CONT.HOOK.INDEX #obj2ind ]>].
; (ERB 2002-01-02) [NUCL +] on head daughter seems overly
; restrictive (esp. since I'm trying to make all head-adjunct rules
; [NUCL -] on the mother). I'm guessing it was here to reduce
; ambiguity in sentences with multiple te clauses. Perhaps something
; similar could be achieved by distinguishing te-coordination on
; finite clauses and te-coordination on other te-clauses.
; (ERB 2002-01-14) Allow comma-headed conjuncts in this rule by
; generalizing to verb_head-super.
; (ERB 2002-01-22) NUCL conj now on supertype.
; (MS 2003-12-19) Matrix 0.6
; (MS 2004-06-25) [HEAD.EMPTY -] to prevent spuriou ambiguity on 食べているご飯
sentence-te-coordination-rule := sentence-coord-type &
[SYNSEM [LOCAL [BAR +,
CONT.HOOK.XARG #xarg]],
C-CONT.RELS.LIST.FIRST.PRED "coord",
ARGS <[SYNSEM.LOCAL [CAT [HEAD verb_head-super &
[J-POSTHEAD coord,
C-MOD < synsem & [LOCAL [CAT #1,
CONT #3,
BAR #5,
NUCL #6],
LEX #2,
NON-LOCAL #4] > ],
VAL saturated],
CONT.HOOK.XARG #xarg,
BAR +],
J-NEEDS-AFFIX -],
[SYNSEM synsem & [LOCAL [BAR +,
CAT #1 & [VAL saturated, HEAD.EMPTY -],
CONT #3,
BAR #5,
NUCL #6,
NUCL nucl_plus],
LEX #2,
NON-LOCAL #4],
J-NEEDS-AFFIX -] > ].
; (MS 2004-06-25) We need something for the XARG. Try the XARG of the second conjunct.
; (FCB 2006-03-12) FIXME: I am pretty sure it shouldn't be that, but I don't know what it should be.
conj-rule := conj-rule-type &
[SYNSEM [LOCAL [BAR +,
CONT.HOOK.XARG #xarg],
MODIFIED.PERIPH +],
ARGS <[SYNSEM.LOCAL [CAT [HEAD [J-POSTHEAD left,
C-MOD < [MODIFIED.PERIPH #periph] >],
VAL saturated],
BAR +]],
[SYNSEM synsem & [LOCAL [BAR +,
CONT.HOOK.XARG #xarg],
MODIFIED.PERIPH #periph]]>].
; ERB (2001-09-03) Redefining the vn-light-rule to be a kind of a head-specifier rule.
; This is so that the light verbs can have some say in the valence of the whole
; combination. In particular, I want dekiru to be able to ga-mark the object.
; ERB (2001-09-03) Turns out we don't need a special subtype of the h-spr rule, as
; the ordinary one will do the work (of course!).
; (MS 2003-12-19) Matrix 0.6
; (MS 2004-01-09) grab the KEYS from the VN.
;;; FCB made J-NEEDS-AFFIX BOOl to annoy Melanie 2009-03-13
;;; also allows : (lkb::do-parse-tty "勉強 さ せ た")
; try making the infl rule pass up LIGHT (to block head-specifier)
; try making the output of this LIGHT - (didn't work)
vn-light-rule := head-marker-rule &
[SYNSEM [LOCAL [BAR bool,
CAT.HEAD [KEYS #keys,
LIGHT bool],
CONT.HOOK #hook],
LEX +],
J-NEEDS-AFFIX #affix,
RMORPH-BIND-TYPE #morphbind,
ARGS <[SYNSEM synsem & [LOCAL [CAT.HEAD vn_head & [KEYS #keys],
CONT.HOOK #hook,
BAR -]]],
[SYNSEM synsem & [LOCAL [CAT.HEAD light-verb_head &
[AUX aux_minus, LIGHT +]]],
INFLECTED +,
J-NEEDS-AFFIX #affix,
RMORPH-BIND-TYPE #morphbind]>].
; (ERB 2002-01-02) Adding a rule for VN+vends (esp. VN + kudasai).
; Pulled out similarities between new rule and vstem-vend-rule to
; supertype vstem-vend-rule-type.
; (MS 2005-11-14) MAIN-PRD should come from the stem, otherwise we get
; spurious ambiguity with the ga-no-conversion rule.
;;; CH+FCB+TK added LEX +
;;(lkb::do-parse-tty "投げ た")
;;; VN-play
;;;
;;; try just using vstem-vend --- link specifiers, HEAD verb-stem_head
;;; don't pass up MODIFIED.PERIPH
vstem-vend-rule := stem-end-rule-type &
[ SYNSEM [LOCAL.CAT [ HEAD verb_head,
VAL.SPR #spr]],
ARGS < [ SYNSEM [LOCAL.CAT [HEAD verb-stem_head &
[LIGHT #light,
MAIN-PRD #main],
VAL.SPR #spr ],
LEX bool],
J-NEEDS-AFFIX + ],
[SYNSEM.LOCAL.CAT.HEAD verb_head & [LIGHT #light,
MAIN-PRD #main]] >].
;;; FCB changed verbend_head to verb_head
; [SYNSEM.LOCAL.CAT.HEAD verbend_head & [LIGHT #light,
; MAIN-PRD #main]] >].
;;(lkb::do-parse-tty "投げ そこなっ た")
;;; CH+FCB+TK added LEX +
;;;「た」が「投げ そこなっ」と「そこなっ」のどちらに結び付くかの曖昧性をなくすため
; aux-vend-rule := stem-end-rule-type &
; [ SYNSEM [LOCAL.CAT.VAL.SPR #spr,
; MODIFIED.PERIPH #per],
; J-NEEDS-AFFIX #aff,
; ARGS < [ SYNSEM [LOCAL.CAT [HEAD other-verb-stem_head &
; [COP -,
; H-TENSE #tense],
; VAL.SPR #spr],
; LEX +],
; J-NEEDS-AFFIX + ],
; [J-NEEDS-AFFIX #aff,
; SYNSEM [LOCAL.CAT.HEAD verb_head & [H-TENSE #tense],
; MODIFIED.PERIPH #per]] >].
na-vend-rule := stem-end-rule-type &
[ SYNSEM.LOCAL.CAT.VAL.SPR null,
J-NEEDS-AFFIX #aff,
ARGS < [ SYNSEM.LOCAL.CAT.HEAD na-adj_head],
[J-NEEDS-AFFIX #aff,
SYNSEM.LOCAL.CAT.HEAD verbend_head] >].
; (MS 2004-11-08) This one should keep the LMORPH-BIND-TPYE: 来やすい
; (MS 2004-12-21) This doesn't necessarily have to be FIN +: 偽りなく
; (S 2005-01-06) Copy up ARG-S.
unary-vstem-vend-rule := unary-type-super &
[SYNSEM [LOCAL [CAT #cat,
CONT #cont,
CTXT #ctxt,
ARG-S #args,
BAR +]],
J-NEEDS-AFFIX -,
LMORPH-BIND-TYPE #lmorph,
ARGS < [SYNSEM [LOCAL [CAT #cat & [HEAD verb-stem_head & [FIN bool,
VN -,
LIGHT -,
EMPTY -]],
CONT #cont,
CTXT #ctxt,
ARG-S #args,
BAR -],
LEX +],
LMORPH-BIND-TYPE #lmorph,
J-NEEDS-AFFIX -] >].
; (ERB 2002-01-02) Getting double parses for "お送りいただきたい"
; because いただきたい is compatible with the head of hsr and the
; vend of vn-vend-rule. (Similar problems don't arise with
; 食べていただきたい because 食べて is also [HEAD v-end_head] and
; therefore incompatible with the vstem-vend rule.) This is a
; bit of a hack, but keep the vn-vend-rule from appying in these
; cases by requiring vend to be [AUX -].
; (MS 2002-11-29) Do we need this rule???
;vn-vend-rule := stem-end-rule-type &
;[ ARGS < [SYNSEM.LOCAL.CAT.HEAD vn_head],
; [SYNSEM.LOCAL.CAT.HEAD.AUX -] >].
; (MS 2003-12-19) Matrix 0.6
; FCB & DPF make the specifier empty
vend-vend-rule := head-marker-rule &
[SYNSEM [LOCAL [NUCL nucl_plus,
CONT.HOOK #hook,
BAR #bar],
LEX +,
MODIFIED.PERIPH #per],
J-NEEDS-AFFIX #aff,
LMORPH-BIND-TYPE #lmorph,
RMORPH-BIND-TYPE #rmorph,
ARGS <[SYNSEM synsem & [LOCAL [CAT [HEAD verbend_head & [MODUS #mod],
VAL.SPR <>],
BAR #bar]],
J-NEEDS-AFFIX +,
RMORPH-BIND-TYPE #mt,
LMORPH-BIND-TYPE #lmorph,
INFLECTED +],
[SYNSEM synsem & [LOCAL [CAT.HEAD verbend_head & [MODUS #mod],
CONT.HOOK #hook],
MODIFIED.PERIPH #per],
J-NEEDS-AFFIX #aff,
LMORPH-BIND-TYPE #mt,
RMORPH-BIND-TYPE #rmorph,
INFLECTED +]>].
;seminaa ga ichinichijuu haitte orimashite
; (ERB 2002-01-02) For some reason, we weren't copying up the
; MOD-IND and MOD-HAND in this rule. It might be a more general
; problem, but fixing it here for now.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; FCB removing the modified peripheral link
;
head-specifier-rule := head-specifier-rule-type &
adjacent-spr-check &
[SYNSEM [LOCAL [BAR #bar,
CAT [VAL [UNSAT -,
SPR null],
HEAD.FIN #bool],
CONT.HOOK [XARG #xarg,
INDEX #mind,
LTOP #mhand]],
LEX -,
MODIFIED.PERIPH bool],
ARGS <[SYNSEM synsem & [MODIFIED.PERIPH bool],
J-NEEDS-AFFIX -],
[SYNSEM synsem & [LOCAL [ CAT.HEAD.FIN #bool,
BAR #bar,
CONT.HOOK [XARG #xarg,
INDEX #mind,
LTOP #mhand]]]]>].
; (MS 2005-06-20) AHON needs to be copied, because the prefixes are often honorific.
prefix-attach-rule := prefix-rule &
[SYNSEM.LOCAL.CAT.HEAD.FORMAL.AHON #ahon,
ARGS < [SYNSEM.LOCAL [BAR -,
CAT.HEAD hon-prefix_head & [FORMAL.AHON #ahon] ],
J-NEEDS-AFFIX -],
[SYNSEM.LOCAL.BAR bool,
J-NEEDS-AFFIX -] >].
; (MS 2003-12-19) Matrix 0.6
; (do-parse-tty "ビール が 飲み たい")
tai-obj-change-rule := obj-casechange-rule &
[SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST [OPT - ,
LOCAL.CAT.HEAD overt-case-p_head &
[CASE ga]],
ARGS < [SYNSEM [LOCAL [CAT [HEAD v-op-end_head & [KEYS.KEY tai_v_want_rel],
VAL [SPR null,
SUBJ null]]]]] >].
;; 機関の変更したい
;
; I would prefer to delete these
;
; vn-light-obj-change-rule-case-p := obj-casechange-rule &
; [SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST [OPT - ,
; LOCAL.CAT.HEAD overt-case-p_head &
; [CASE no-case]],
; RMORPH-BIND-TYPE #rmorph,
; ARGS < [SYNSEM.LOCAL.CAT [HEAD light-verb_head,
; VAL.SPR null],
; RMORPH-BIND-TYPE #rmorph] >].
; vn-light-obj-change-rule-noun := obj-casechange-rule &
; [SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST [OPT - ,
; LOCAL.CAT [HEAD noun_head,
; VAL saturated]],
; RMORPH-BIND-TYPE #rmorph,
; ARGS < [SYNSEM.LOCAL.CAT [HEAD light-verb_head,
; VAL.SPR null],
; RMORPH-BIND-TYPE #rmorph] >].
; (ERB 2001-09-26) Constraining head-dtr to be [HEAD verb_head-avm]
; so that this rule can't apply after the vstem-vend-rule.
; (FCB 2006-08-09) Constraining things to be BAR - for the same reason
; FIXME why do this and tai-obj-change-rule come on opposite sides of the vend-rule
; (do-parse-tty "ビール が 飲める")
; (do-parse-tty "犬 が 食べ られる")
rareru-obj-change-rule := obj-casechange-rule &
[SYNSEM.LOCAL [CAT.VAL [COMPS.FIRST.LOCAL [ CAT.HEAD overt-case-p_head &
[CASE ga]]],
BAR +],
ARGS < [SYNSEM [LOCAL [ CAT [HEAD verb_head & [KEYS.KEY rareru_v_can_rel,
MODUS potential],
VAL.SUBJ null],
BAR +]]] >].
; (MS 2004-12-10) I don't want this to apply to copula verbs (generation).
; FIXME doesn't apply now
;(do-parse-tty "犬 を 欲し がる")
garu-sbj-change-rule := subj-casechange-rule &
[SYNSEM.LOCAL.CAT.VAL [SUBJ.FIRST [LOCAL.CAT.HEAD overt-case-p_head &
[CASE wo]]],
ARGS < [SYNSEM [LOCAL.CAT [HEAD [KEYS.KEY garu_v_seem_rel,
COP -],
VAL.SUBJ.FIRST.LOCAL.CAT.HEAD.CASE ga]]] >].
; (ERB 2001-09-20) We want currency NumClPs at least to be possible
; left daughters of compounds for things like 百円ノート or
; 二万ドル車. That these are actually compounds is shown by the
; pronunciation of the latter (niman doru guruma), which involves rendaku.
; (MS 2001-10-10) But if you restrict them to be BAR -, they can (e.g.) not be modified. Let them be BAR bool and everything is possible?
; (ERB 2001-11-01) Breaking this up into three rules. See notes
; in ruletypes.tdl.
; (ERB 2004-1-20) Trying to conflate the two noncards.
;nominal-numcl-rule-nomod := nominal-numcl-rule-nomod &
; [ SYNSEM.LOCAL.BAR bool ].
;nominal-numcl-rule-mod := nominal-numcl-rule-mod &
; [ SYNSEM.LOCAL.BAR bool ].
nominal-numcl-rule := nominal-numcl-rule-type-noncard.
; (ERB 2004-1-20) Try getting rid of this one in favor of
; always jusing the noncard variant.
;nominal-numcl-rule-card := nominal-numcl-rule-card &
; [ SYNSEM.LOCAL.BAR + ].
; ERB (2001-09-24) Overhauling the date expressions. They will be
; nouns to start with, so we don't need this.
;nominal-date-rule := nominal-date-rule-type &
; [ SYNSEM.LOCAL.BAR + ].
; (ERB 2004-1-20) This seems to be working now, but it's creating
; huge amounts of ambiguity. I suggest leaving it out until we
; have a means of putting in sortal constraints to keep these guys
; from serving as modifiers of other number names which are
; serving as nouns.
; empty-cardinal-numcl-rule := empty-cardinal-numcl-type.
; (ERB 2001-11-14) Unary rule to bind off QUE values in embedded
; questions.
; (ERB 2002-02-11) Changed to binary rule see notes at embedded-rule-type.
; If and when we make the embedded-question-rule a subtype of hcomp-rule-type,
; the constraints on AFFIX could probably be moved up.
embedded-question-rule := embedded-question-rule-type &
[SYNSEM.NON-LOCAL [QUE ,
AFFIX #affixlist],
HEAD-DTR comp-int-lex &
[SYNSEM.NON-LOCAL.AFFIX ],
NON-HEAD-DTR.SYNSEM.NON-LOCAL.AFFIX #affixlist].
quasi-morph-rule := binary-basic &
[SYNSEM [LOCAL [CAT [HEAD #head,
VAL #sc],
CONT #cont],
NON-LOCAL.QUE [ LIST #firstque,
LAST #lastque ]],
ARGS < [SYNSEM [LOCAL [CAT [HEAD ordinary_noun_head,
VAL.UNSAT +],
BAR -],
NON-LOCAL.QUE [ LIST #firstque,
LAST #middleque ]]],
[SYNSEM [LOCAL [CONT #cont,
CAT [HEAD na-adj-basic_head & #head,
VAL #sc & [UNSAT +]]],
NON-LOCAL.QUE [ LIST #middleque,
LAST #lastque ]]] >].
;(CH 2003-08-15) 動詞語幹+動詞語幹
;(FIXME) semantics がおかしい場合がある。
; ex) V2がV1のイベントを取る場合の解釈ができない。
; almost lost the ambiguity with VAL.UNSAT +
; but for some reason subj-zpro-ins-lrule won't run after the vstem-vstem rule
; because of a conflict of SUBJ NUL and sat-arg-list
; (MS and FCB 2003-10-29) With UNSAT - one gets rid of the ambiguity, but the
; identification of VAL is not correct; and one cannot get GA-WO.
; The valence composition must be re-worked here.
; (MS 2004-02-25) No, UNSAT - is also not right. One doesn't get readings for both
; zero pronouns and subjects, playing around with UNSAT.
; Does the valence come from V1? Identifying the agent?
; (MS 2005-02-14) Moved the definitions to rule-types.tdl.
; (FCB 2005-05-24) replaced by richer rules *-lex-vv-rule
;vstem-vstem-rule := vstem-vstem-rule-type.
ga-wo_transitive-lex-vv-rule := ga-wo_transitive-lex-vv-rule-type.
intransitive-lex-vv-rule := intransitive-lex-vv-rule-type.
;(CH 2003-08-27)
; 形容詞を名詞に変える。
;「古 さ」などを解析するため。
; (MS 2005-02-14) Moved the definitions to rule-types.tdl.
adj-nominal-suffix-rule := adj-nominal-suffix-type.
; ADV -> NOUN
; 「重要 さ」
; adv-nominal-suffix-rule := head-final-type &
; [SYNSEM.LOCAL.CAT.VAL.UNSAT -,
; NON-HEAD-DTR [SYNSEM [ LOCAL [CAT [HEAD na-adj_head,
; VAL.UNSAT -],
; BAR -],
; LEX +],
; RMORPH-BIND-TYPE adv_head],
; HEAD-DTR [SYNSEM [LOCAL [CAT [HEAD ordinary_noun_head-avm &
; [J-POSTHEAD right],
; VAL.UNSAT +],
; BAR -]]]].
;;; Fragment rules
;;; unary rules
;犬
frg-np := frag-np-rule.
;東京 へ
frg-pp := frag-pp-rule.
;たぶん
frg-s-adv := frag-s-adv-rule.
;少し
;とて
frg-i-adv := frag-i-adv-rule.
;;; binary fragment rules
;東京 へ 彼
frg-pp-np := frag-pp-np-rule.
;少し 彼
frg-i-adv-np := frag-i-adv-np-rule.
;そこ へ 2
frg-pp-int := frag-pp-int-rule.
;犬 が 動物
frg-cop := frag-cop-rule.