Mike is onto a better approach by looking to constrain ICONS, but see below. While Francis’s strategy for blocking passives has the advantage of making the generator a little more efficient, it would require you to find all of the various lexical rules for passives (there have to be several, alas).
A preferable strategy is to alter the “root” condition imposed on the generator, which controls what it outputs. The default for generation is a root called “root_gen” which already suppresses so-called topicalization such as “Paris, Kim admired.” as a variant of “Kim admired Paris.” ACE has an option for supplying a non-default root, via the “-r” flag; try the following to see it in actionL
“Kim admired Paris.” | ace -g erg.dat -1 | ace -g erg.dat -e -r root_strict
You’ll see the topicalized variants generated, along with the ones you saw before.
Now to suppress passives too, I should have included the following root variant, which constrains ICONS to be empty, blocking both topicalization and passives. You can add this code snippet between the “====” lines to (the end of) the file roots.tdl, and then recompile the ERG:
;; Also exclude passives in generation
root_gen_nopass := phrase &
[ INFLECTD +,
SYNSEM root_synsem &
[ LOCAL [ CAT.HEAD verb_or_conj-s,
CONT.ICONS 0-dlist ],
PUNCT.RPUNCT basic_clause_punct ],
ORTH root_orth ].
I don’t remember if you have already recompiled the ERG, but here’s the command, once you’re in your ERG directory:
ace -G erg.dat -g ace/config.tdl
All that was because I hadn’t already defined that obviously useful root - I’ll check it in to the `trunk’ version of the grammar soon. Now you can try out your change by doing the following:
“Kim admired Paris.” | ace -g erg.dat -1 | ace -g erg.dat -e -r root_gen_nopass
You’ll see just the simple active sentence generated now.