(See also Handling UNKnown words with ACE+SRG for more general discussion).
I am trying to work from example (using jacy) to intruduce token mapping and properly working generic lexical entries to SRG.
It’s a bit complex because there are many files and features involved, and they are handled slightly differently in e.g. ERG and jacy, so I may have mixed up some instructions and advice from various sources.
After I made modifications to the grammar (described below), I started getting the following error compiling the grammar with ACE. The error looks completely unrelated to generic entries, so it must be something I messed up in the feature geometry maybe:
ace -g ace/config.tdl -G srg-generics.dat reading configuration from `ace/config.tdl' grammar version SRG (1007) reading grammar from `ace/../srg.tdl' reading lexical-filtering-rulefrom `ace/../lfr.tdl' reading types from `ace/../fundamentals.tdl' reading types from `ace/../hdtypes.tdl' reading types from `ace/../letypes.tdl' reading types from `ace/../irtypes.tdl' reading types from `ace/../lrtypes.tdl' reading types from `ace/../srtypes.tdl' reading types from `ace/../tmt.tdl' reading token-mapping-rule from `ace/../tmr/prelude.tdl' reading token-mapping-rule from `ace/../tmr/pos.tdl' reading token-mapping-rule from `ace/../tmr/finis.tdl' reading lexical entries from `ace/../lexicon.tdl' reading generic-lex-entry from `ace/../generics.tdl' reading rules from `ace/../srules.tdl' reading lexical rules from `ace/../lrules.tdl' reading lexical rules from `ace/../inflr.tdl' reading instance from `ace/../labels.tdl' reading instance from `ace/../roots.tdl' checking for glbs... 0.17 sec processing constraints... well-formedness: no type is compatible with features and type of `clitic-synsem' while processing `n_-_pr-impers-se_lex' ace: type.c:562: constrain_glbs_and_wellformedness: Assertion `wellform_result == 0' failed. Aborted (core dumped)
n_-_pr-impers-se_lex, it’s this:
n_-_pr-impers-se_lex := clitic-lex & [ SYNSEM clitic-synsem & [ LOCAL [ AGR.PRONTYPE impers, CAT.HEAD.CASE none ] ] ].
; --- 188.8.131.52. Clitics ; - depend phonologically on the verb and can't appear alone; can't appear in a coordination nor be ; selected by identity (e.g. *Juan lo y la trajo; *Juan la lavó y regaló); may produce phonological ; processes in the verb (e.g. sentad+os => sentaos); when appear in a sequence, this can't be interrupted ; (e.g. *lo puede darme) clitic-lex := norm-zero-arg & [ INFLECTED -, SYNSEM [ PUNCT [ LPUNCT no_punct, RPUNCT no_punct ], LOCAL [ COORD -, COORD-STRAT zero, CAT.HEAD noun ] ] ]. ; clitic-synsem := lex-synsem & clitic-synsem := non-canonical & [ LOCAL [ AGR #index, CAT [ MC na, HEAD noun & [ PRD non-prd, MOD < >, KEYS [ KEY pron_rel, ALT2KEY #alt2key ] ], VAL [ SUBJ < >, COMPS < >, SPEC < >, SPR < >, CLTS < > ] ] , CONT [ HOOK [ LTOP #nhand, INDEX #index, XARG #nhand ], RELS <! [ PRED pron_rel, ARG0 #index, LBL #nhand ], [ PRED #alt2key & pronoun_q_rel, ARG0 #index, RSTR #phand ] !>, HCONS <! qeq & [ HARG #phand, LARG #nhand ] !> ] ], NON-LOCAL [ SLASH 0-dlist, REL 0-dlist, QUE 0-dlist ] ].
What should I be looking for? Again, I doubt the clitic type needs to be changed; most likely something much higher up in the hierarchy? At the level of
The modifications I made to the grammar:
- From the folder called tmr in jacy, I added the files: prelude.tdl, pos.tdl, and finis.tdl
srg.tdl, I added:
:begin :instance :status lexical-filtering-rule. :include "lfr.tdl". :end :instance. ... :include "tmt.tdl". ... :begin :instance :status generic-lex-entry. :include "generics.tdl". :end :instance. ... :begin :instance :status token-mapping-rule. :include "tmr/prelude". :include "tmr/pos". ;:include "tmr/pos-ipa". :include "tmr/finis". :end :instance.
token-mapping := enabled. lexicon-tokens-path := TOKENS +LIST. lexicon-last-token-path := TOKENS +LAST. token-type := token. token-form-path := +FORM. ; [required] string for lexical lookup token-id-path := +ID. ; [optional] list of external ids token-from-path := +FROM. ; [optional] surface start position token-to-path := +TO. ; [optional] surface end position token-postags-path := +POS +TAGS. ; [optional] list of POS tags token-posprobs-path := +POS +PRBS. ; [optional] list of POS probabilities lattice-mapping-input-path := +INPUT. lattice-mapping-output-path := +OUTPUT. lattice-mapping-context-path := +CONTEXT. lattice-mapping-position-path := +POSITION.
- Added a file called
lfr.tdl, added just one entry there for now:
generic_non_ne+native_lfr := lexical_filtering_rule & [ +CONTEXT < [ TRAITS native_token_list ] >, +INPUT < [ TRAITS generic_token_list ] >, +OUTPUT < >, +POSITION "I1@C1" ].
generics.tdl, commented everything out except, for now:
v_np_ge := v_np*_le & [ STEM < "_generic_v_rel" >, TOKENS.+LIST generic_token_list & < [ +POS.+TAGS "vmip3p0" ], +PRED #pred >, SYNSEM.LKEYS.KEYREL [ PRED #pred ] ].
sign-min := avm & [ STEM orthog ]. orthog := cons & [ FROM string, TO string ].
lexicon.tdl, for now, just modified one entry:
dormir_v := v_-_le & [ STEM < "dormir" >, SYNSEM.LKEYS.KEYREL.PRED "_dormir_v_rel", TRAITS native_token_list ].
Which of the above things could be causing the issue which manifests itself in compilation with the
Or regardless of the issue that manifests itself in this way, can someone spot some of the things I am not doing right, in the modifications above?