A computational grammar and lexicon for Maltese
A computational grammar and lexicon for Maltese
A computational grammar and lexicon for Maltese
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Maltese</strong> concrete syntax<br />
For the <strong>Maltese</strong> concrete syntax of this <strong>grammar</strong>, we follow the same approach as in the English<br />
but have a few more agreement features to h<strong>and</strong>le. We start by adding the Gender parameter,<br />
<strong>and</strong> then defining a few convenience operations <strong>for</strong> constructing tables from numbers<br />
<strong>and</strong> genders to strings. Note that we completely omit type declarations <strong>for</strong> these operators; the<br />
GF compiler will be able to infer their types.<br />
The linearisation definition <strong>for</strong> Kind is similar in that it inflects <strong>for</strong> number, however we<br />
also add a static g field to hold the gender. Adjectives in <strong>Maltese</strong> inflect <strong>for</strong> both number <strong>and</strong><br />
gender, so the Quality linearisation type contains a table from both of these to a string. The<br />
numGenTbl operation takes care of building this table <strong>for</strong> us. Very works in a similar way as in<br />
English, except that we place the modifier after the adjective <strong>and</strong> have the number <strong>and</strong> gender<br />
arguments to pass along. The rest of the <strong>grammar</strong> should also be quite underst<strong>and</strong>able by now;<br />
once the parameters <strong>and</strong> linearisation types have been decided, the rules themselves tend to<br />
fall into place.<br />
concrete FoodsMlt of Foods = {<br />
flags coding = utf8 ;<br />
param Number = Sg | Pl ;<br />
param Gender = Masc | Fem ;<br />
oper<br />
numTbl : Str -> Str -> (Number => Str) =<br />
\s,p -> table { Sg => s ; Pl => p } ;<br />
genTbl : Str -> Str -> (Gender => Str) =<br />
\m,f -> table { Masc => m ; Fem => f } ;<br />
numGenTbl : Str -> Str -> Str -> (Number => Gender => Str) =<br />
\m,f,p -> table {<br />
Sg => genTbl m f ;<br />
Pl => \\_ => p<br />
} ;<br />
lincat Kind = { s : Number => Str ; g : Gender } ;<br />
lin<br />
Cheese = { s = numTbl "ġobna" "ġobniet" ; g = Fem };<br />
Fish = { s = numTbl "ħuta" "ħut" ; g = Fem };<br />
lincat Quality = { s : Number => Gender => Str } ;<br />
lin<br />
Expensive = { s = numGenTbl "għali" "għalja" "għaljin" } ;<br />
Delicious = { s = numGenTbl "tajjeb" "tajba" "tajbin" } ;<br />
Very quality = { s = \\n,g => quality.s ! n ! g ++ ħ"afna"} ;<br />
lincat Item = { s : Str ; n : Number ; g : Gender } ;<br />
lin<br />
12