Hi Kei,
I'm sorry for the delayed answer, but it seems like noone else has given your question a try.
It was a while I was using NLTK's grammars, but as I recall the FCFGs are not implemented with generation in mind, which means that it's inefficient and probably doesn't work correctly. FCFG is a unification-based formalism, and sine Python doesn't have unification built-in, NLTK has its own implementation. It's really cool: feature structures are subclasses of standard Python dictionaries, and unification even works for dict types, but it's slow (because it's written in Python), and the generator does not make use of unificationn (as I recall).
Your options are:
(1) Rewrite the generator to use unification as early as possible, not as a post-filter; this requires some coding skills, as well as reading NLTK source code.
(2) Use a programming language with built-in unification, such as Prolog which has both built-in unification and backtracking, and nice syntax for writing grammars. It doesn't have feature structures built-in, but instead terms which work perfectly fine for medium-sized grammars. I suggest to use XSB Prolog, which uses tabling/memoisation that stops it from falling into infinite left-recursion loops. (Which for grammar means that you can write left-recursive grammars without worrying)
http://xsb.sourceforge.net
(3) Use another formalism, such as Grammatical Framework (GF). It's a functional formalism, not unification-based: instead of unification, you apply functions to parameters. It's also multilingual and there is a quite large resource grammar (a kind of API) of 30+ langauges, including German. So as soon as you have learned how to thing GF, it should be fairly straight-forward to use the resource grammar to implement your own domain-specific grammar.
http://www.grammaticalframework.org
Good luck!
/Peter
PS. Now I see that it was me who you replied to... didn't notice until now:)
> To unsubscribe from this group and stop receiving emails from it, send an email to
nltk-users+...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/nltk-users/2b2ebbf0-2d66-4a9c-9463-5e1148240cbf%40googlegroups.com.
------- ------ ----- ---- --- -- - - - - -
peter ljunglöf
peter.l...@gu.se
data- och informationsteknik, och språkbanken
göteborgs universitet och chalmers tekniska högskola
-------------- --------- -------- ------- ------ ----- ---- --- -- - - - - -