1
0
forked from GitHub/gf-core

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
--
-- Maltese Resource Grammar Library
-- John J. Camilleri, 2011
-- John J. Camilleri, 2012
-- Licensed under LGPL
concrete AdjectiveMlt of Adjective = CatMlt ** open ResMlt, Prelude in {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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