I have a grammar which has: (1) token mapping types; (2) a lexical filtering rule; and (3) a couple of sample generic and native lexical entries as follows:
In generics.tdl
:
v_np_ge := v_np*_le &
[ STEM < "v_np*_le" >,
TOKENS.+LIST generic_token_list &
< [ +POS.+TAGS < "vmip3p0" > ] >,
SYNSEM.LKEYS.KEYREL [ PRED "_generic_v_rel" ] ].
In lexicon.tdl
:
dormir_v := v_-_le &
[ STEM < "dormir" >,
SYNSEM.LKEYS.KEYREL.PRED "_dormir_v_rel",
TRAITS native_token_list
].
This grammar behaves fine in the sense that it filters out the generic entry for something like
(1, 0, 1, <0:5>, 1, "ellos" "ellos", 0, "pp3mp00", "pp3mp00" 1) (2, 1, 2, <6:13>, 1, "dormir" "duermen", 0, "vmip3p0", "vmip3p0" 1)
Ellos duermen (they sleep) and successfully parses something like Ellos sobreandan (they float [over something]; the corresponding input in YY mode, as above), even though sobreandar is not in the lexicon.
However, I understand that eventually, I will need also the token mapping rules, such as the ones found here: srg/tmr at olzama-dev · delph-in/srg · GitHub
I copied those over from zhong, only three files, prelude
, pos
, and finis
. If I actually include them in the grammar, it stops parsing sentences.
I think I can spot that it loses the POS information for the tokens, the list of TAGS is empty:
Instead, it should look like this in order to further unify with the POS-tag-specific “inflectional rule” and then further go into the head-subject rule (this is from the grammar which does not include token mapping rules):
Does anyone more familiar with how the token mapping rules work see what would cause the POS TAGS list to become empty after including the token mapping rules in the grammar?
Here’s some ACE standard output for Ellos duermen, which it ultimately cannot parse. All of them seem to have to do with the generics, so, maybe not relevant for the native entry, though the unknown word doesn’t get parsed either, in the corresponding example:
LATTICE-MAPPING: applying default_carg_tmr
LATTICE-MAPPING: applying default_carg_tmr
LATTICE-MAPPING: applying pos_terminate_tmr
LATTICE-MAPPING: applying pos_terminate_tmr
LATTICE-MAPPING: applying generic_pred_tmr
LATTICE-MAPPING: applying generic_pred_tmr
LATTICE-MAPPING: applying default_class_tmr
LATTICE-MAPPING: applying default_class_tmr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
LATTICE-MAPPING: applying generic_non_ne+native_lfr
SKIP: (yy mode)