Maltese RGL: removed 'case' inflections from nouns

This commit is contained in:
john.j.camilleri
2012-02-21 14:39:19 +00:00
parent cf221bd363
commit 8c00c7bcd6
29 changed files with 1672 additions and 1668 deletions

View File

@@ -1,7 +1,7 @@
-- AdjectiveMlt.gf: adjectives -- AdjectiveMlt.gf: adjectives
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete AdjectiveMlt of Adjective = CatMlt ** open ResMlt, Prelude in { concrete AdjectiveMlt of Adjective = CatMlt ** open ResMlt, Prelude in {

View File

@@ -1,7 +1,7 @@
-- AdverbMlt.gf: adverbial phrases -- AdverbMlt.gf: adverbial phrases
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete AdverbMlt of Adverb = CatMlt ** open ResMlt, Prelude in { concrete AdverbMlt of Adverb = CatMlt ** open ResMlt, Prelude in {

View File

@@ -1,7 +1,7 @@
-- AllMlt.gf: common grammar plus language-dependent extensions -- AllMlt.gf: common grammar plus language-dependent extensions
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:prelude:../abstract:../common --# -path=.:prelude:../abstract:../common

View File

@@ -1,7 +1,7 @@
-- AllMlt.gf: common grammar plus language-dependent extensions -- AllMlt.gf: common grammar plus language-dependent extensions
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:prelude:../abstract:../common --# -path=.:prelude:../abstract:../common

View File

@@ -1,7 +1,7 @@
-- CatMlt.gf: the common type system -- CatMlt.gf: the common type system
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--concrete CatMlt of Cat = CommonX ** open ResMlt, Prelude, ParamX in { --concrete CatMlt of Cat = CommonX ** open ResMlt, Prelude, ParamX in {

View File

@@ -1,7 +1,7 @@
-- ConjunctionMlt.gf: co-ordination -- ConjunctionMlt.gf: co-ordination
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete ConjunctionMlt of Conjunction = CatMlt ** open ResMlt, Coordination, Prelude in { concrete ConjunctionMlt of Conjunction = CatMlt ** open ResMlt, Coordination, Prelude in {

View File

@@ -1,7 +1,7 @@
-- ExtraMlt.gf: extra stuff -- ExtraMlt.gf: extra stuff
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete ExtraMlt of ExtraMltAbs = CatMlt ** concrete ExtraMlt of ExtraMltAbs = CatMlt **

View File

@@ -1,7 +1,7 @@
-- ExtraMltAbs.gf: abstract grammar for extra stuff -- ExtraMltAbs.gf: abstract grammar for extra stuff
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
abstract ExtraMltAbs = Cat ** { abstract ExtraMltAbs = Cat ** {

View File

@@ -1,7 +1,7 @@
-- GrammarMlt.gf: common syntax -- GrammarMlt.gf: common syntax
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:../abstract:../common:../prelude --# -path=.:../abstract:../common:../prelude

View File

@@ -1,7 +1,7 @@
-- IdiomMlt.gf: idiomatic expressions -- IdiomMlt.gf: idiomatic expressions
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in { concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in {

View File

@@ -1,7 +1,7 @@
-- IrregMlt.gf: irregularly inflected words (mostly verbs) -- IrregMlt.gf: irregularly inflected words (mostly verbs)
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:prelude:../abstract:../common --# -path=.:prelude:../abstract:../common

View File

@@ -1,7 +1,7 @@
-- IrregMltAbs.gf: abstract grammar for irregularly inflected words (mostly verbs) -- IrregMltAbs.gf: abstract grammar for irregularly inflected words (mostly verbs)
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:prelude:../abstract:../common --# -path=.:prelude:../abstract:../common

View File

@@ -1,7 +1,7 @@
-- LangMlt.gf: common syntax and lexicon -- LangMlt.gf: common syntax and lexicon
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:../abstract:../common:../prelude --# -path=.:../abstract:../common:../prelude

View File

@@ -1,7 +1,7 @@
-- LexiconMlt.gf: test lexicon of 300 content words -- LexiconMlt.gf: test lexicon of 300 content words
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:../abstract:../common:../prelude --# -path=.:../abstract:../common:../prelude

View File

@@ -1,7 +1,7 @@
-- MorphoMlt.gf: morphology -- MorphoMlt.gf: morphology
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
resource MorphoMlt = ResMlt ** open Prelude in { resource MorphoMlt = ResMlt ** open Prelude in {

View File

@@ -1,7 +1,7 @@
-- NounMlt.gf: noun phrases and nouns -- NounMlt.gf: noun phrases and nouns
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in { concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in {

View File

@@ -1,7 +1,7 @@
-- NumeralMlt.gf: cardinals and ordinals -- NumeralMlt.gf: cardinals and ordinals
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete NumeralMlt of Numeral = CatMlt [Numeral,Digits] ** open Prelude,ResMlt in { concrete NumeralMlt of Numeral = CatMlt [Numeral,Digits] ** open Prelude,ResMlt in {
@@ -327,13 +327,11 @@ concrete NumeralMlt of Numeral = CatMlt [Numeral,Digits] ** open Prelude,ResMlt
-- Sub1000 -> Sub1000000 ; m * 1000 -- Sub1000 -> Sub1000000 ; m * 1000
pot3 m = { pot3 m = {
s = s =
case m.n of { case <m.n, m.thou.treatAs> of {
NumSg => numTable "elf" ; -- 1 * 1000 <NumSg ,_> => numTable "elf" ; -- 1 * 1000
NumDual => numTable "elfejn" ; -- 2 * 2000 <NumDual,_> => numTable "elfejn" ; -- 2 * 2000
NumPl => case m.thou.treatAs of { <NumPl ,Unit> => numTable m.thou.s "elef" ; -- 3-10 * 1000
Unit => numTable m.thou.s "elef" ; -- 3-10 * 1000 <NumPl ,_> => numTable m.thou.s "elf" -- 11+ * 1000
_ => numTable m.thou.s "elf" -- 11+ * 1000
}
} ; } ;
{- {-
case m.f of { case m.f of {
@@ -362,7 +360,12 @@ concrete NumeralMlt of Numeral = CatMlt [Numeral,Digits] ** open Prelude,ResMlt
NumAdjectival => "u" ++ (n.s ! NCard ! NumAdjectival) NumAdjectival => "u" ++ (n.s ! NCard ! NumAdjectival)
} }
in in
case m.n of { case <m.n, m.thou.treatAs> of {
<NumSg ,_> => numTable "elf" ukemm ;
<NumDual,_> => numTable "elfejn" ukemm ;
<NumPl ,Unit> => numTable (m.thou.s ++ "elef") ukemm ;
<NumPl ,_> => numTable (m.thou.s ++ "elf") ukemm
} ;
{- {-
NumSg => elf2 "elf" ukemm ; NumSg => elf2 "elf" ukemm ;
NumDual => elf2 "elfejn" ukemm ; NumDual => elf2 "elfejn" ukemm ;
@@ -371,13 +374,6 @@ concrete NumeralMlt of Numeral = CatMlt [Numeral,Digits] ** open Prelude,ResMlt
_ => elf2 m.thou ("elf" ++ ukemm) _ => elf2 m.thou ("elf" ++ ukemm)
} }
-} -}
NumSg => numTable "elf" ukemm ;
NumDual => numTable "elfejn" ukemm ;
NumPl => case m.thou.treatAs of {
Unit => numTable (m.thou.s ++ "elef") ukemm ;
_ => numTable (m.thou.s ++ "elf") ukemm
}
} ;
thou = { thou = {
s = m.thou.s ; s = m.thou.s ;
treatAs = m.f ; treatAs = m.f ;

View File

@@ -1,5 +1,5 @@
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
resource OrthoMlt = open Prelude, Predef in { resource OrthoMlt = open Prelude, Predef in {

View File

@@ -1,7 +1,7 @@
-- ParadigmsMlt.gf: morphological paradigms -- ParadigmsMlt.gf: morphological paradigms
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:../abstract:../../prelude:../common --# -path=.:../abstract:../../prelude:../common
@@ -109,11 +109,11 @@ resource ParadigmsMlt = open
in in
{ {
s = table { s = table {
Singular Singulative => buildCaseTable sing ; Singular Singulative => buildNounTable sing ;
Singular Collective => buildCaseTable coll ; Singular Collective => buildNounTable coll ;
Dual => buildCaseTable dual ; Dual => buildNounTable dual ;
Plural Determinate => buildCaseTable det ; Plural Determinate => buildNounTable det ;
Plural Indeterminate => buildCaseTable ind Plural Indeterminate => buildNounTable ind
} ; } ;
g = gender ; g = gender ;
} ; } ;
@@ -191,20 +191,28 @@ resource ParadigmsMlt = open
-- Gender -- Gender
mkNounWorst : Str -> Str -> Str -> Str -> Str -> Gender -> Noun = \sing,coll,dual,det,ind,gen -> { mkNounWorst : Str -> Str -> Str -> Str -> Str -> Gender -> Noun = \sing,coll,dual,det,ind,gen -> {
s = table { s = table {
Singular Singulative => buildCaseTable sing ; Singular Singulative => buildNounTable sing ;
Singular Collective => buildCaseTable coll ; Singular Collective => buildNounTable coll ;
Dual => buildCaseTable dual ; Dual => buildNounTable dual ;
Plural Determinate => buildCaseTable det ; Plural Determinate => buildNounTable det ;
Plural Indeterminate => buildCaseTable ind Plural Indeterminate => buildNounTable ind
} ; } ;
g = gen ; g = gen ;
} ; } ;
-- Build a definiteness table for a single noun number form
-- Params:
-- noun form (eg NEMLA, NEMEL, NEMLIET)
buildNounTable : Str -> (Definiteness => Str) = \noun ->
table {
Definite => addDefinitePreposition "il" noun ;
Indefinite => noun
};
{-
-- Build a definiteness/case table for a single noun number form -- Build a definiteness/case table for a single noun number form
-- Params: -- Params:
-- noun form (eg NEMLA, NEMEL, NEMLIET) -- noun form (eg NEMLA, NEMEL, NEMLIET)
buildCaseTable : Str -> (Definiteness => Case => Str) = \noun -> buildNounTable : Str -> (Definiteness => Case => Str) = \noun ->
table { table {
Definite => table { Definite => table {
Benefactive => addDefinitePreposition "għall" noun; Benefactive => addDefinitePreposition "għall" noun;
@@ -231,7 +239,7 @@ resource ParadigmsMlt = open
Nominative => noun Nominative => noun
} }
}; };
-}
{- {-
-- Correctly abbreviate definite prepositions and join with noun -- Correctly abbreviate definite prepositions and join with noun
-- Params: -- Params:

View File

@@ -1,5 +1,5 @@
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
resource PatternsMlt = { resource PatternsMlt = {

View File

@@ -1,7 +1,7 @@
-- PhraseMlt.gf: suprasentential phrases -- PhraseMlt.gf: suprasentential phrases
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete PhraseMlt of Phrase = CatMlt ** open ParamX, Prelude, ResMlt in { concrete PhraseMlt of Phrase = CatMlt ** open ParamX, Prelude, ResMlt in {

View File

@@ -1,7 +1,7 @@
-- QuestionMlt.gf: questions and interrogatives -- QuestionMlt.gf: questions and interrogatives
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete QuestionMlt of Question = CatMlt ** open ResMlt, ParamX, Prelude in { concrete QuestionMlt of Question = CatMlt ** open ResMlt, ParamX, Prelude in {

View File

@@ -1,7 +1,7 @@
-- RelativeMlt.gf: relational clauses and pronouns -- RelativeMlt.gf: relational clauses and pronouns
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete RelativeMlt of Relative = CatMlt ** open ResMlt in { concrete RelativeMlt of Relative = CatMlt ** open ResMlt in {

View File

@@ -1,7 +1,7 @@
-- ResMlt.gf: Language-specific parameter types, morphology, VP formation -- ResMlt.gf: Language-specific parameter types, morphology, VP formation
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:../abstract:../common:../prelude --# -path=.:../abstract:../common:../prelude
@@ -115,7 +115,7 @@ resource ResMlt = PatternsMlt ** open Prelude in {
| Vocative -- referent being adressed, eg AA TARBIJA (lol) | Vocative -- referent being adressed, eg AA TARBIJA (lol)
; ;
-} -}
{-
-- CASE AS DEFINED BY ME -- CASE AS DEFINED BY ME
-- Noun cases (note my examples include DEFINITE ARTICLE) -- Noun cases (note my examples include DEFINITE ARTICLE)
-- Commented lines mean that noun iflection is unchanged, not that the case does not occur in Maltese! -- Commented lines mean that noun iflection is unchanged, not that the case does not occur in Maltese!
@@ -148,7 +148,7 @@ resource ResMlt = PatternsMlt ** open Prelude in {
-- | Translative -- referent noun or adjective as result of process of change -- | Translative -- referent noun or adjective as result of process of change
-- | Vocative -- referent being adressed, eg AA TARBIJA (lol) -- | Vocative -- referent being adressed, eg AA TARBIJA (lol)
; ;
-}
-- Person = P1 | P2 | P3 ; -- Person = P1 | P2 | P3 ;
-- State = Def | Indef | Const ; -- State = Def | Indef | Const ;
-- Mood = Ind | Cnj | Jus ; -- Mood = Ind | Cnj | Jus ;
@@ -244,7 +244,7 @@ resource ResMlt = PatternsMlt ** open Prelude in {
} ; } ;
-} -}
Noun : Type = { Noun : Type = {
s : Noun_Number => Definiteness => Case => Str ; s : Noun_Number => Definiteness => Str ;
g : Gender ; g : Gender ;
} ; } ;

View File

@@ -1,7 +1,7 @@
-- SentenceMlt.gf: clauses and sentences -- SentenceMlt.gf: clauses and sentences
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:abstract:common:prelude --# -path=.:abstract:common:prelude

View File

@@ -1,7 +1,7 @@
-- StructuralMlt.gf: lexicon of structural words -- StructuralMlt.gf: lexicon of structural words
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete StructuralMlt of Structural = CatMlt ** concrete StructuralMlt of Structural = CatMlt **

View File

@@ -1,5 +1,5 @@
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
--# -path=.:abstract:common --# -path=.:abstract:common

View File

@@ -1,7 +1,7 @@
-- TextMlt.gf: many-phrase texts -- TextMlt.gf: many-phrase texts
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in { concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in {

View File

@@ -1,7 +1,7 @@
-- VerbMlt.gf: verb phrases -- VerbMlt.gf: verb phrases
-- --
-- Maltese Resource Grammar Library -- Maltese Resource Grammar Library
-- John J. Camilleri, 2011 -- John J. Camilleri, 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete VerbMlt of Verb = CatMlt ** open Prelude, ResMlt in { concrete VerbMlt of Verb = CatMlt ** open Prelude, ResMlt in {