;;; -*- Mode: tdl; Coding: utf-8; -*- ;;; ;;; Copyright (c) 1994-2018 ;;; Dan Flickinger, Rob Malouf, Emily M. Bender ;;; see LICENSE for conditions ;;; ;;; roots.tdl ;;; ; The instances in this file are needed by the parser to know which phrase ; types to accept as successful parses of the full input string. ;; DPF 2016-12-03 - Note that the order of definition is significant for ACE ;; (at least presently), since it checks these root symbols in the order of ;; definition, not based on the order they are listed in the config file. root_strict := phrase & """ Recommended for generation Formal edited written English, ending with clause punctuation. We admire Oslo. We gotta admire Oslo. """ [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CAT.HEAD verb_or_conj-s, PUNCT.RPUNCT basic_clause_punct ], GENRE edited, DIALECT us, ORTH root_orth ]. root_gen := phrase & """ Formal edited written English, punctuated, including both focus and passives We admire tall trees. Tall trees, we admire. """ [ INFLECTD +, SYNSEM root_gen_synsem, GENRE edited, DIALECT us, ORTH root_orth ]. root_gen_nofocus := phrase & """ Formal edited written English, punctuated, no focus movement Recommended default for generation excluding focus-movement (aka topicalization) We admire tall trees. Tall trees, we admire. """ [ INFLECTD +, SYNSEM root_gen_synsem & [ LOCAL.CONT.ICONS.LIST *nonfocuslist* ], GENRE edited, DIALECT us, ORTH root_orth ]. root_gen_nopass := phrase & """ Formal edited written English, punctuated, no focus movement, also exclude passives in generation """ [ INFLECTD +, SYNSEM root_synsem & [ LOCAL [ CAT.HEAD verb_or_conj-s, CONT.ICONS 0-dlist ], PUNCT.RPUNCT basic_clause_punct ], GENRE edited, DIALECT us, ORTH root_orth ]. root_decl := phrase & """ Exclude imperatives and questions (e.g. for grammar checking) """ [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CONT.HOOK.INDEX.SF prop, PUNCT.RPUNCT clause_or_pair_or_no_punct ], GENRE standard, ORTH root_orth ]. root_question := phrase & [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CONT.HOOK.INDEX.SF ques, PUNCT.RPUNCT clause_or_pair_or_no_punct ], GENRE standard, DIALECT us, ORTH root_orth ]. root_command := phrase & [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CONT.HOOK.INDEX.SF comm, PUNCT.RPUNCT clause_or_pair_or_no_punct ], GENRE standard, DIALECT us, ORTH root_orth ]. root_informal := phrase & """ Nonformal written English, does not require clause punctuation. Recommended for parsing, unless domain is all edited text You gotta admire Oslo. """ [ INFLECTD +, SYNSEM root_synsem, GENRE standard, ORTH root_orth ]. root_formal := phrase & [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CAT.HEAD verb_or_conj-s, PUNCT.RPUNCT basic_clause_punct ], GENRE formal, DIALECT us, ORTH root_orth ]. root_spoken := phrase & """ Full sentences reflecting spoken phenomena For robust spoken language phenomena, like sentence final *and* Restrict to only CONJ cnil, since already have cl_cnj-frg_c for *and Kim stayed* Kim will, um, stay, and. """ [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD verb & [ VFORM fin_or_imp, TAM indic_tam ], MC + ], CONJ cnil ], PUNCT.RPUNCT comma_or_clause_or_pair_or_no_punct ], GENRE spoken, ORTH root_orth ]. root_spoken_frag := phrase & """ Fragments (not full sentences) reflecting spoken phenomena the, um, cat """ [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD frag & [ TAM indic_tam ], MC + ], CONJ cnil_or_lexconj ] ], GENRE spoken, ORTH root_orth ]. root_inffrag := sign & """ Informal fragments Fragments (not full sentences), nonformal cats, dogs and horses """ [ SYNSEM root_frag_synsem, GENRE standard, ORTH root_orth ]. root_frag := sign & """ For well-formed fragments in formal genre Fragments (not full sentences), formal written english cats, dogs, and horses """ [ SYNSEM root_frag_synsem & [ PUNCT.RPUNCT clause_or_no_punct ], GENRE formal, DIALECT us, ORTH root_orth ]. root_robust_frag := sign & """ Robust fragments Fragments (not full sentences), robust when it chases dog """ [ SYNSEM root_frag_synsem, GENRE robust, ORTH root_orth ]. ;; DPF 2016-08-08 - Changed HEAD verb_or_frag to just verb since we also have ;; root_robust_frag. And same for CONJ cnil_or_lexconj => cnil. root_robust := phrase & """ Used when parsing in hybrid mode, to allow PCFG analyses to emerge. """ [ INFLECTD +, SYNSEM root_synsem, GENRE robust, ORTH root_orth ]. root_robust_s := phrase & """ Robust sentences only """ [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD verb_or_conj-s & [ MOD *anti_list*, VFORM fin_or_bse_or_imp ], VAL.SUBJ *anti_list*, MC + ], CONT.HOOK.INDEX.SF #sf, CONJ cnil ], PUNCT.RPUNCT comma_or_clause_or_pair_or_no_punct & [ PSF #sf ] ], GENRE robust, ORTH root_orth ]. root_non_idiom := sign & """ Used to determine on which candidate root edges to not apply the idiom checks (for efficiency) """ [ IDIOM - ]. ;;; The following four are used for `fragmented' (in the LOGON sense) input ;;; for generator root_phr := sign & [ SYNSEM phr_synsem & [ LOCAL [ CAT [ HEAD [ INV -, TAM.MOOD indicative, MINORS.MIN norm_rel ], VAL [ COMPS < >, SPR *olist* ] ], CONJ cnil ], NONLOC [ SLASH.LIST < >, REL.LIST < > ], LEX -, PUNCT no_punctuation ], INFLECTD +, ORTH root_orth ]. root_lex := sign & [ SYNSEM [ LEX +, LOCAL [ CAT.HEAD non_frag & [ AUX na ], CONJ cnil ], NONLOC.SLASH.LIST < >, PUNCT.RPUNCT clause_or_no_punct ], INFLECTD + ]. ; DPF 09-Jan-00 - Removed MSG message from root_conj, to admit eg "or on ; Tuesday" root_conj := sign & [ SYNSEM [ LOCAL [ CAT.VAL.COMPS < >, CONJ lex-conj ], NONLOC [ SLASH.LIST < >, REL.LIST < > ], PUNCT no_punctuation ], INFLECTD +, ORTH root_orth ]. root_subord := sign & [ SYNSEM [ LOCAL [ CAT [ HEAD prep, VAL.COMPS < > ], CONJ cnil ], NONLOC [ SLASH.LIST < >, REL.LIST < > ], PUNCT no_punctuation ], INFLECTD +, ORTH root_orth ]. #| root_robust_ques := phrase & [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD verbal_or_conj-s & [ VFORM fin, TAM.MOOD indicative ], MC + ], CONT.HOOK.INDEX.SF ques, CONJ cnil ], PUNCT.RPUNCT comma_or_clause_or_pair_or_no_punct & [ PSF prop-or-ques ] ], GENRE robust, DIALECT us, ORTH root_orth ]. |# root_robust_ques := phrase & [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD verbal_or_conj-s & [ VFORM fin, TAM.MOOD indicative ], MC + ], CONT.HOOK.INDEX.SF ques, CONJ cnil ], PUNCT.RPUNCT comma_or_pair_or_no_punct & [ PSF prop-or-ques ] ], GENRE robust, DIALECT us, ORTH root_orth ]. ; "How happy would he be if we stayed!" root_exclam_ques := phrase & [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD verbal_or_conj-s & [ VFORM fin, TAM.MOOD indicative ], MC + ], CONT.HOOK.INDEX.SF ques, CONJ cnil ], PUNCT.RPUNCT clause_punct & [ PSF comm ] ], GENRE standard, DIALECT us, ORTH root_orth ]. root_bridge := phrase & [ SYNSEM.LOCAL.CAT.HEAD bridge_head, INFLECTD - ]. root_paraphrase := phrase & """ For paraphrase generation only, as for example with the reverse-appositive rule to generate both *Kim the teacher* and *the teacher Kim* from same MRS. """ [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CONT.HOOK.INDEX.SF prop, PUNCT.RPUNCT clause_or_pair_or_no_punct ], GENRE paraphrase, ORTH root_orth ].