% Simple grammar (with gender/number concordance) % a sentence is made of: subject, verb, object frase --> soggetto(Number), verbo(Number), comp_oggetto. soggetto(Number) --> articolo(Gender,Number), agente(Gender,Number). comp_oggetto --> articolo(Gender,Number), oggetto(Gender,Number). articolo(male,singular) --> [ il ]. articolo(male,plural) --> [ gli ]. articolo(female,singular) --> [ la ]. articolo(female,plural) --> [ le ]. % DEMO: SHOW translated predicates with listing(Pred). % the word have a specific gender % we represent it by using a more complex (parametric) head of the rule agente(female,singular) --> [ elefantessa ]. agente(male,singular) --> [ elefante ]. agente(male,plural) --> [ elefanti ]. agente(_,singular) --> [ chirurgo ]. % surgeon in Italian is used for both male and female verbo(singular) --> [ mangiava ]. verbo(plural) --> [ mangiavano ]. verbo(singular) --> [ guardava ]. oggetto( female,singular ) --> [ insalata ]. oggetto( male,singular ) --> [ cavolfiore ]. % % TASK % add some more examples with number concordance (singular/plural) % in subject/verb and article/name pairs with the necessary other % rule parameters % % % TASK % apply elision to articles (l'elefante, l'insalata) (atom_chars could help) % % % % TASK % return the parse tree %