From c9d840a7be59872ec5f09363015ecd7254f4f29e Mon Sep 17 00:00:00 2001 From: olzama Date: Fri, 10 May 2024 17:14:30 +0200 Subject: [PATCH] past participlesfixed maybe? --- generics.tdl | 9 ++ irtypes.tdl | 10 +- letypes.tdl | 4 +- lexicon.tdl | 7 ++ lrtypes.tdl | 156 ++++++++++++----------------- srtypes.tdl | 8 +- util/freeling_api/srg-freeling.dat | 2 + 7 files changed, 95 insertions(+), 101 deletions(-) diff --git a/generics.tdl b/generics.tdl index 1b4d036..46cba23 100644 --- a/generics.tdl +++ b/generics.tdl @@ -738,6 +738,15 @@ vmp00sm_ge := v_np*_le & Generic lexical entry that will be triggered by tag vmp00sm. """. +vmp00sm-pp_ge := v_np*_le & + [ STEM < "v_np*_le" >, + TOKENS.+LIST generic_token_list & < [ +POS.+TAGS < "vmp00sm-pp" > ] >, + SYNSEM.LKEYS.KEYREL.PRED "_generic_v_rel" ] + """ + Generic lexical entry that will be triggered by tag vmp00sm-pp. + """. + + vmp00pm_ge := v_np*_le & [ STEM < "v_np*_le" >, TOKENS.+LIST generic_token_list & < [ +POS.+TAGS < "vmp00pm" > ] >, diff --git a/irtypes.tdl b/irtypes.tdl index 391c1e8..e933f9c 100644 --- a/irtypes.tdl +++ b/irtypes.tdl @@ -826,6 +826,7 @@ vpart-haber_ilr := verb_ilr & vpart_ilr := inflecting-lex-rule & [ INFLECTED +, + ;KEY-ARG #keyarg, SYNSEM [ LOCAL [ ;AGR #agr, CAT [ MC #mc, HEAD verb & [ AUX -, @@ -844,10 +845,13 @@ vpart_ilr := inflecting-lex-rule & LTOP #hand ], RELS #rels, HCONS #hcons ], - CTXT #ctxt ], + CTXT #ctxt, + COORD #coord, + COORD-STRAT #coord-strat ], LKEYS #lkeys, NON-LOCAL #nonloc ], DTR [ INFLECTED -, + ;KEY-ARG #keyarg, SYNSEM [ LOCAL [ CAT [ MC #mc, HEAD verb & [ VFORM part, @@ -863,7 +867,9 @@ vpart_ilr := inflecting-lex-rule & LTOP #hand ], RELS #rels, HCONS #hcons ], - CTXT #ctxt ], + CTXT #ctxt, + COORD #coord, + COORD-STRAT #coord-strat ], LKEYS #lkeys, NON-LOCAL #nonloc ] ], C-CONT.RELS ]. diff --git a/letypes.tdl b/letypes.tdl index 4539da4..dd6abe3 100644 --- a/letypes.tdl +++ b/letypes.tdl @@ -4885,7 +4885,7 @@ v_aux_haber_synsem := lex-synsem & KEYS.ALTKEY #altkey ], VAL.COMPS < [ OPT -, LOCAL [ CAT.HEAD [ INV #inv, - PRD non-prd, + PRD non-prd & [ HABER + ], VFORM part, KEYS [ KEY #ckey, ALTKEY #altkey ] ], @@ -4908,7 +4908,7 @@ v_aux_vp-part_synsem := v_aux_haber_synsem & [ LOCAL [ AGR #sind, CAT.VAL [ SUBJ < [ LOCAL np_nom_local & #subject & [ AGR #sind ] ] >, COMPS < [ LOCAL.CAT vp_cat & - [ HEAD [ VOICE active, PRD non-prd & [ HABER + ] ], + [ HEAD.VOICE active, VAL [ SUBJ < [ LOCAL #subject ] >, CLTS #clts ] ] ] >, CLTS #clts ], diff --git a/lexicon.tdl b/lexicon.tdl index 1dc7b40..b591675 100644 --- a/lexicon.tdl +++ b/lexicon.tdl @@ -118328,6 +118328,13 @@ hace_p := p_np_i-tmp-vm_native_le & "hace tres semanas" """. +hacía_p := p_np_i-tmp-vm_native_le & +[ STEM < "hacer" > ] +""" +"hacía tres semanas" +""". + + hacedado_n := n_-_c_native_le & [ STEM < "hacendado" >, SYNSEM.LKEYS.KEYREL [ ARG0.SORT hum, diff --git a/lrtypes.tdl b/lrtypes.tdl index b14c0b7..587dffa 100644 --- a/lrtypes.tdl +++ b/lrtypes.tdl @@ -836,70 +836,16 @@ n_pp-vp_dlr := vfin_vinf-lex-rule & e.g. la necesidad (de la empresa) (de) que lleguen a un acuerdo/de llegar a un acuerdo """. - -ppart-lex-rule := const-ltol-rule & - [ SYNSEM [ LOCAL [ AGR #agr, - CAT [ HEAD verb & [ AUX -, - PRD.HABER -, - VFORM part, - VOICE passive, - TAM [ TENSE #tense, - MOOD #mood ], - KEYS.KEY #key, - MOD < > ], - VAL [ SPR #spr, - SUBJ < synsem & - [ LOCAL np_nom_local & - [ AGR #agr, - CONT #objcont & [ HOOK.INDEX #agr ] ], - NON-LOCAL #ononloc & [ SLASH 0-dlist ] ] >, - COMPS < [ OPT +, - LOCAL mrkd_np_local & - [ CAT.HEAD.KEYS.KEY _por_p_sel_rel, - CONT.HOOK [ LTOP #hand, - INDEX #subjind ] ], - NON-LOCAL #snonloc ]. #comps > ] ], - CONT [ HOOK [ INDEX #arg0 & [ E.MOOD #mood ], - LTOP #hand ], - RELS #rels, - HCONS #hcons ], - CTXT #ctxt ], - LKEYS #lkeys, - NON-LOCAL #nonloc ], - DTR [ INFLECTED +, - SYNSEM [ LOCAL [ CAT [ HEAD verb & - [ PRD.HABER -, - VFORM part, - VOICE active, - TAM [ TENSE #tense, - MOOD #mood ], - KEYS.KEY #key ], - VAL [ SPR #spr, - SUBJ < [ LOCAL np_nom_local & - [ CONT.HOOK.INDEX #subjind ], - NON-LOCAL #snonloc ] >, - COMPS [ FIRST [ LOCAL [ CONT #objcont ], - NON-LOCAL #ononloc ], - REST #comps ] ] ], - CONT [ HOOK [ INDEX #arg0, - LTOP #hand ], - RELS #rels, - HCONS #hcons ], - CTXT #ctxt ], - LKEYS #lkeys, - NON-LOCAL #nonloc ] ] ]. - - -#| -ppart-lex-rule := const-ltol-rule & +ppart-basic-lex-rule := const-ltol-rule & [ ALTS.PASS -, + KEY-ARG #keyarg, + INFLECTED +, SYNSEM [ PUNCT #punct, SLSHD #slshd, - LOCAL [ CAT [ MC #mc, - HEAD verb & [ AUX -, + LOCAL [ CAT [ HEAD verb & [ AUX -, VFORM part, VOICE passive, - TAM #tam & [ MOOD #mood ], + TAM #tam, KEYS.KEY #key, MOD < >, LSYNSEM #lsynsem, @@ -912,68 +858,92 @@ ppart-lex-rule := const-ltol-rule & NON-LOCAL [ SLASH 0-dlist, QUE 0-dlist ] ] > ], CONT [ HOOK [ INDEX #index, - LTOP #hand, - XARG #xarg ], + LTOP #hand ], HCONS #hcons, - RELS #rels & [ LIST < [ ARG0 #index & [ E.MOOD #mood ] ], ... > ] ], - CTXT #ctxt ], + RELS #rels ], + CTXT #ctxt, + COORD #coord, + COORD-STRAT #coord-strat, + COORD-REL #coord-rel ], LKEYS #lkeys, NON-LOCAL #nonloc ], DTR [ INFLECTED +, + KEY-ARG #keyarg, ALTS.PASS +, SYNSEM [ PUNCT #punct & [ RPUNCT no_punct ], SLSHD #slshd, - LOCAL [ CAT [ MC #mc, - HEAD verb & [ PRD non-prd & [ HABER - ], + LOCAL [ CAT [ HEAD verb & [ PRD non-prd & [ HABER - ], VFORM part, VOICE active, TAM #tam, - KEYS.KEY #key, - LSYNSEM #lsynsem ], + LSYNSEM #lsynsem, + KEYS.KEY #key ], VAL.SPR < > ], - CONT [ HOOK [ LTOP #hand, - XARG #xarg ], + CONT [ HOOK [ LTOP #hand ], HCONS #hcons, RELS #rels ], - CTXT #ctxt ], + CTXT #ctxt, + COORD #coord, + COORD-STRAT #coord-strat, + COORD-REL #coord-rel ], LKEYS #lkeys, - NON-LOCAL #nonloc ] ], - C-CONT.RELS ] + NON-LOCAL #nonloc ] ] ] + """ + --- LR types for participles + -- LR type building pastparts for passive constructions + """. + + +ppart-lex-rule := ppart-basic-lex-rule & + [ SYNSEM [ LOCAL [ AGR #agr, + CAT [ VAL [ SUBJ < synsem & + [ LOCAL np_nom_local & + [ AGR #agr, + CONT #objcont & [ HOOK.INDEX #agr ] ], + NON-LOCAL #ononloc & [ SLASH 0-dlist ] ] >, + COMPS < [ OPT +, + LOCAL mrkd_np_local & + [ CAT.HEAD.KEYS.KEY _por_p_sel_rel, + CONT.HOOK [ INDEX #subjind ] ], + NON-LOCAL #snonloc ]. #comps >, + CLTS #clts ] ] ] ], + DTR [ SYNSEM [ LOCAL [ CAT [ VAL [ SUBJ < [ LOCAL np_nom_local & + [ CONT.HOOK.INDEX #subjind ], + NON-LOCAL #snonloc ] >, + COMPS [ FIRST [ LOCAL [ CONT #objcont ], + NON-LOCAL #ononloc ], + REST #comps ], + CLTS #clts ] ] ] ] ] ]. + + +ppart-intran-lex-rule := ppart-basic-lex-rule & + [ SYNSEM [ LOCAL [ CAT.MC #mc, + CONT [ HOOK [ XARG #xarg, + INDEX #index ], + RELS.LIST < [ ARG0 #index ], ... > ] ] ], + DTR.SYNSEM.LOCAL [ CAT.MC #mc, + CONT.HOOK.XARG #xarg ] ] """ --- LR types for participles -- LR type building pastparts for passive constructions """. -|# v_pastpart-trans_dlr := ppart-lex-rule & - [ SYNSEM.LOCAL [ AGR #arg2, - CAT [ HEAD [ INV -, + [ SYNSEM.LOCAL [ CAT [ HEAD [ INV -, PRD prd & [ COPV ser ] ], - VAL [ SUBJ < unexpressed & [ OPT +, - LOCAL np_nom_local & [ CONT #objcont, - AGR #arg2 ], - NON-LOCAL #ononloc ] >, - COMPS < [ OPT +, - LOCAL mrkd_np_local & [ CAT.HEAD.KEYS.KEY _por_p_sel_rel, - CONT.HOOK.INDEX #subjind ], - NON-LOCAL #snonloc ] . #comps >, - CLTS #clts ] ], + VAL [ SUBJ < unexpressed & [ OPT + ] > ] ], CONT.RELS.LIST < [ ARG1 #subjind, ARG2 #arg2 ], ... > ], DTR [ INFLECTED +, SYNSEM.LOCAL [ AGR #arg2, - CAT.VAL [ SUBJ < [ LOCAL np_nom_local & [ CONT.HOOK.INDEX #subjind ], - NON-LOCAL #snonloc ] >, - COMPS [ FIRST [ LOCAL np_acc_local & [ CONT #objcont & [ HOOK.INDEX #arg2 ], - AGR #arg2 ], - NON-LOCAL #ononloc ], - REST #comps ], - CLTS #clts] ] ] ] + CAT.VAL [ SUBJ < [ LOCAL np_nom_local & [ CONT.HOOK.INDEX #subjind ] ] >, + COMPS.FIRST [ LOCAL np_acc_local & [ CONT.HOOK.INDEX #arg2, + AGR #arg2 ] ] ] ] ] ] """ -- with transitive verbs """. -v_pastpart-unacc_dlr := ppart-lex-rule & +v_pastpart-unacc_dlr := ppart-intran-lex-rule & [ SYNSEM.LOCAL [ AGR #agr, CAT [ HEAD [ INV +, PRD non-prd ], @@ -993,7 +963,7 @@ v_pastpart-unacc_dlr := ppart-lex-rule & """. -v_pastpart-pron_dlr := ppart-lex-rule & +v_pastpart-pron_dlr := ppart-intran-lex-rule & [ SYNSEM.LOCAL [ AGR #agr, CAT [ HEAD [ INV +, PRD non-prd ], diff --git a/srtypes.tdl b/srtypes.tdl index 2cf5032..29ebeb3 100644 --- a/srtypes.tdl +++ b/srtypes.tdl @@ -969,9 +969,10 @@ isect-mod-phrase := head-mod-phrase-simple & head-compositional & C-CONT.HCONS ]. adj-head_scop_phrase := adj-head-phrase & scopal-mod-phrase & - [ HEAD-DTR.SYNSEM.LOCAL.CAT.VAL.COMPS < >, + [ SYNSEM.LOCAL.CAT.HEAD.PRD.HABER #haber, + HEAD-DTR.SYNSEM.LOCAL.CAT.VAL.COMPS < >, NON-HEAD-DTR.SYNSEM.LOCAL [ CAT [ POSTHEAD -, - HEAD adv ] ] ] + HEAD +jrp & [ PRD.HABER #haber ] ] ] ] """ ; scopal adjunct + head """. @@ -1087,8 +1088,7 @@ head-adj-int-v-xp-phrase := head-adj-phrase & isect-mod-phrase & [ SYNSEM.LOCAL.CAT.VAL.SPR #spr, HEAD-DTR.SYNSEM [ LOCAL.CAT [ HEAD verb, VAL.SPR #spr ], - NON-LOCAL.REL 0-dlist, - SLSHD - ], + NON-LOCAL.REL 0-dlist ], ; NON-HEAD-DTR.SYNSEM [ LOCAl.CAT.POSTHEAD +, NON-HEAD-DTR.SYNSEM.NON-LOCAL [ SLASH 0-dlist, REL 0-dlist & [ LIST < > ] ] ] diff --git a/util/freeling_api/srg-freeling.dat b/util/freeling_api/srg-freeling.dat index c5565e4..19c9c64 100644 --- a/util/freeling_api/srg-freeling.dat +++ b/util/freeling_api/srg-freeling.dat @@ -39,6 +39,7 @@ algunas @any rueda @any peor @any mejor @any +divertido @any ## List of words for which the list of output analysis given @@ -120,6 +121,7 @@ off-line off-line AQ0CN00 on-line on-line AQ0CN00 no_sólo no_sólo CC no_sólo RG hace hace SP hacer VMIP3S0 +hacía hacía SP hacer VMII3S0 ## List of tag fusions to perform.