Hi!
Discussing the problem with Tracy H. King, I've found a solution, correcting the DP rule thus:
DP --> { Dbar[art] | Dbar[pron] }.
These alternatives don't work:
"DP --> Dbar[_type]."
"DP --> Dbar."
"DP --> Dbar[]."
The rest of the grammar and the lexical rules were correct. This variant, declaring the possible values for the _type variable on the left hand side of the rule, also has worked:
Dbar[_type $ {art pron}] --> { D[_type]: _type=art ^=! ; NP: ^=! "COMMENT{EX RULES DP: os brasileiros}" | D[_type]: _type=pron ^=! ; { NP "COMMENT{EX RULES DP: nós brasileiros}" | e: (^ PRED)='pro' "COMMENT{EX RULES DP: nós}" } }.
Best, Leonel ---------------------------------------------- Prof. Dr. Leonel Figueiredo de Alencar Department of Foreign Languages and Literatures / Linguistics Master's & PhD Program Research Group on Language and Computation http://complin.blogspot.com.br Federal University of Ceará leonel.de.alencar@ufc.br leonel@daad-alumni.de
On 12-Feb-18, at 1:05 PM, Leonel F. de Alencar wrote:
Hi everybody!
I'd like to implement complex categories in my Brazilian Portuguese LFG/XLE grammar. Unfortunately, I couldn't find any toy grammar with this feature to guide my first steps. Following Butt et. al. (1999:192) and Stefanie Dipper's dissertation from 2003, I've tried to implement the attached toy DP grammar using complex categories, but none of the grammatical examples in the testfile.lfg are parsed. Could someone explain to me where I'm wrong and possibly correct the grammar so that these examples are parsed? Just for the sake of learning how to deal with complex categories, I've assumed that DPs like "we Brazilians" are headed by the personal pronoun (i.e. D[pron]). In the case of D[pron], NP is optional. With an article as head (i.e. D[art]), however, NP is obligatory. Many thanks in advance. Best, Leonel
Prof. Dr. Leonel Figueiredo de Alencar Department of Foreign Languages and Literatures / Linguistics Master's & PhD Program Federal University of Ceará http://complin.blogspot.com.br leonel.de.alencar@ufc.br
<testfile.lfg><toy-portuguese.lfg>