;;; -*- 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. ; Recommended for generation ; ; Formal edited written English, ending with clause punctuation. ; We admire Oslo. ; We gotta admire Oslo. ; ; ; root_strict := phrase & [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CAT.HEAD verb_or_conj-s, PUNCT.RPUNCT basic_clause_punct ], GENRE edited, DIALECT us, ORTH root_orth ]. ; Recommended for generation excluding focus-movement (aka topicalization) ; ; Formal edited written English, punctuated, no focus movement ; We admire tall trees. ; Tall trees, we admire. ; ; ; root_gen := phrase & [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CAT.HEAD verb_or_conj-s, LOCAL.CONT.ICONS.LIST *nonfocuslist*, PUNCT.RPUNCT basic_clause_punct ], GENRE edited, DIALECT us, ORTH root_orth ]. ; Exclude imperatives and questions (e.g. for grammar checking) root_decl := phrase & [ 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 ]. ; Recommended for parsing, unless domain is all edited text ; ; Nonformal written English, does not require clause punctuation. ; You gotta admire Oslo. ; ; ; ; root_informal := phrase & [ 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 ]. ; 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| ; ; Full sentences reflecting spoken phenomena ; Kim will, um, stay, and. ; ; ; ; root_spoken := phrase & [ 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 ]. ; ; Fragments (not full sentences) reflecting spoken phenomena ; the, um, cat ; ; ; ; root_spoken_frag := phrase & [ INFLECTD +, SYNSEM basic_root_synsem & [ LOCAL [ CAT [ HEAD frag & [ TAM indic_tam ], MC + ], CONJ cnil_or_lexconj ] ], GENRE spoken, ORTH root_orth ]. ; Informal fragments ; ; Fragments (not full sentences), nonformal ; cats, dogs and horses ; ; ; ; root_inffrag := sign & [ SYNSEM root_frag_synsem, GENRE standard, ORTH root_orth ]. ; For well-formed fragments in formal genre ; ; Fragments (not full sentences), formal written english ; cats, dogs, and horses ; ; ; ; root_frag := sign & [ SYNSEM root_frag_synsem & [ PUNCT.RPUNCT clause_or_no_punct ], GENRE formal, DIALECT us, ORTH root_orth ]. ; Robust fragments ; ; Fragments (not full sentences), robust ; when it chases dog ; ; ; ; root_robust_frag := sign & [ 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. ;; ;; Used when parsing in hybrid mode, to allow PCFG analyses to emerge. ;; root_robust := phrase & [ INFLECTD +, SYNSEM root_synsem, GENRE robust, ORTH root_orth ]. ; robust sentences only root_robust_s := phrase & [ 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 ]. ; Used to determine on which candidate root edges to not apply the idiom checks ; (for efficiency) root_non_idiom := sign & [ 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 0-dlist & [ LIST < > ], REL 0-dlist & [ LIST < > ] ], LEX -, PUNCT no_punctuation ], INFLECTD +, ORTH root_orth ]. root_lex := sign & [ SYNSEM [ LEX +, LOCAL [ CAT.HEAD non_frag & [ AUX na ], CONJ cnil ], 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 0-dlist & [ LIST < > ], REL 0-dlist & [ LIST < > ] ], PUNCT no_punctuation ], INFLECTD +, ORTH root_orth ]. root_subord := sign & [ SYNSEM [ LOCAL [ CAT [ HEAD prep, VAL.COMPS < > ], CONJ cnil ], NONLOC [ SLASH 0-dlist & [ LIST < > ], REL 0-dlist & [ 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 ], MC + ], CONT.HOOK.INDEX.SF ques, CONJ cnil ], PUNCT.RPUNCT comma_or_clause_or_pair_or_no_punct & [ PSF prop ] ], GENRE standard, DIALECT us, ORTH root_orth ]. root_bridge := phrase & [ SYNSEM.LOCAL.CAT.HEAD bridge_head, INFLECTD - ]. ;; 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. ;; root_paraphrase := phrase & [ INFLECTD +, SYNSEM root_synsem & [ LOCAL.CONT.HOOK.INDEX.SF prop, PUNCT.RPUNCT clause_or_pair_or_no_punct ], GENRE paraphrase, ORTH root_orth ].