adjustments and clean-up in resource

This commit is contained in:
aarne
2006-02-26 18:43:13 +00:00
parent f1ffa2f17d
commit 4a21c9b6e2
27 changed files with 84 additions and 70 deletions

View File

@@ -1,8 +1,8 @@
(AR 24/2/2006) (AR 24/2/2006)
(c) Björn Bringert and Aarne Ranta 2005-2006 (c) Björn Bringert and Aarne Ranta 2005-2006
Based on grammars and lexicon in GF/examples/stoneage by Björn Bringert. Based on grammars and lexicon in GF/examples/stoneage by Björn Bringert.
These grammars use a more varying syntax, with negation, questions, These grammars use a more varying syntax, with negation, questions,
imperatives, adverbs, and adjectival predication added. imperatives, adverbs, and adjectival predication added.

View File

@@ -226,7 +226,7 @@ concrete SwadeshIta of Swadesh = CatIta
see_V = dirV2 (see_V2) ; see_V = dirV2 (see_V2) ;
sew_V = verboV (cucire_103 "cucire") ; sew_V = verboV (cucire_103 "cucire") ;
sing_V = regV "cantare" ; sing_V = regV "cantare" ;
sit_V = verboV (sedere_84 "sedere") ; --- refl? sit_V = reflV (verboV (sedere_84 "sedere")) ;
sleep_V = sleep_V ; sleep_V = sleep_V ;
smell_V = dirV2 (verboV (sentire_99 "sentire")) ; smell_V = dirV2 (verboV (sentire_99 "sentire")) ;
spit_V = regV "sputare" ; spit_V = regV "sputare" ;

View File

@@ -4,7 +4,7 @@ test:
echo "gr -cat=Text -number=11 -prob | tb" | gf -nocf -probs=lang.gfprob langs.gfcm echo "gr -cat=Text -number=11 -prob | tb" | gf -nocf -probs=lang.gfprob langs.gfcm
langs: langs:
echo "s ;; pm | wf langs.gfcm" | gf -nocf -src */Lang??*.gf english/LangEng.gf +RTS -M500M -K100M echo "s ;; pm | wf langs.gfcm" | gf -nocf -src */Lang??*.gf english/LangEng.gf +RTS -M800M -K100M
cp -p */*.gfc */*.gfr ../alltenses cp -p */*.gfc */*.gfr ../alltenses
present: present:

View File

@@ -14,7 +14,7 @@ Eng: non-contracted negations
Ita: infinitive contractions Ita: infinitive contractions
Ita: articles in possessives %Ita: articles in possessives
%Ger: constituents of infinitive VP %Ger: constituents of infinitive VP
@@ -36,7 +36,7 @@ API: mathematical/: math-specific lexicon
API: multimodal/: dialogue-specific lexicon API: multimodal/: dialogue-specific lexicon
API: swadesh/: build a swadesh-related API and migrate lexica %API: swadesh/: build a swadesh-related API and migrate lexica
API: mathematical/: symbolic formulas as Cl API: mathematical/: symbolic formulas as Cl

View File

@@ -5,7 +5,7 @@
-- forms of sentences. Together they give 2 x 4 x 4 = 16 sentence forms. -- forms of sentences. Together they give 2 x 4 x 4 = 16 sentence forms.
-- These tenses are defined for all languages in the library. More tenses -- These tenses are defined for all languages in the library. More tenses
-- can be defined in the language extensions, e.g. the "passé simple" of -- can be defined in the language extensions, e.g. the "passé simple" of
-- Romance languages. -- Romance languages.
abstract Tense = { abstract Tense = {

View File

@@ -31,8 +31,8 @@ abstract Verb = Cat ** {
-- them. In many languages, the result is a participle that -- them. In many languages, the result is a participle that
-- is used as complement to a copula ("is used"), but other -- is used as complement to a copula ("is used"), but other
-- auxiliary verbs are possible (Ger. "wird angewendet", It. -- auxiliary verbs are possible (Ger. "wird angewendet", It.
-- "viene usato"), as well as special verb forms (Fin. "käytetään", -- "viene usato"), as well as special verb forms (Fin. "käytetään",
-- Swe. "används"). -- Swe. "används").
-- --
-- *Note*. the rule can be overgenerating, since the $V2$ need not -- *Note*. the rule can be overgenerating, since the $V2$ need not
-- take a direct object. -- take a direct object.

View File

@@ -15,9 +15,9 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
} ; } ;
ncase : Case -> NForm = \c -> ncase : Case -> NForm = \c ->
case <n,c,det.isNum,det.isPoss, det.isDef> of { case <n,c,det.isNum,det.isPoss, det.isDef> of {
<_, Nom, True,_,_> => NCase Sg Part ; -- kolme kytkintä(ni) <_, Nom, True,_,_> => NCase Sg Part ; -- kolme kytkintä(ni)
<_, _, True,False,_> => NCase Sg c ; -- kolmeksi kytkimeksi <_, _, True,False,_> => NCase Sg c ; -- kolmeksi kytkimeksi
<Pl,Nom, _,_,False> => NCase Pl Part ; -- kytkimiä <Pl,Nom, _,_,False> => NCase Pl Part ; -- kytkimiä
<_, Nom,_,True,_> => NPossNom ; -- kytkime+ni on/ovat... <_, Nom,_,True,_> => NPossNom ; -- kytkime+ni on/ovat...
<Sg,Gen,_,True,_> => NPossNom ; -- kytkime+ni vika <Sg,Gen,_,True,_> => NPossNom ; -- kytkime+ni vika
<Pl,Gen,_,True,_> => NPossGenPl ; -- kytkimie+ni viat <Pl,Gen,_,True,_> => NPossGenPl ; -- kytkimie+ni viat
@@ -59,7 +59,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
} ; } ;
DetPl quant num ord = { DetPl quant num ord = {
s1 = \\c => quant.s1 ! c ++ num.s ! Pl ! c ++ ord.s ! Pl ! c ; s1 = \\c => quant.s1 ! c ++ num.s ! Sg ! c ++ ord.s ! Pl ! c ;
s2 = quant.s2 ; s2 = quant.s2 ;
n = Pl ; n = Pl ;
isNum = num.isNum ; isNum = num.isNum ;

View File

@@ -45,9 +45,9 @@ concrete QuestionFin of Question = CatFin ** open ResFin, Prelude in {
let let
k = npform2case c ; k = npform2case c ;
ncase = case <k,num.isNum> of { ncase = case <k,num.isNum> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä <Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi <_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi
_ => NCase n k -- mitkä kytkimet _ => NCase n k -- mitkä kytkimet
} }
in in
idet.s ! k ++ num.s ! Sg ! k ++ ord.s ! n ! k ++ cn.s ! ncase ; idet.s ! k ++ num.s ! Sg ! k ++ ord.s ! n ! k ++ cn.s ! ncase ;

View File

@@ -28,8 +28,8 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
SlashVVV2 np vv v2 = SlashVVV2 np vv v2 =
let let
sc = case v2.sc of { sc = case v2.sc of {
NPCase Nom => vv.sc ; -- joka minun täytyy pestä NPCase Nom => vv.sc ; -- joka minun täytyy pestä
c => c -- joka minulla täytyy olla c => c -- joka minulla täytyy olla
} }
in in
{s = \\t,ag,p => {s = \\t,ag,p =>
@@ -53,7 +53,7 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
c2 = prep c2 = prep
} ; } ;
EmbedS s = {s = "että" ++ s.s} ; EmbedS s = {s = "että" ++ s.s} ;
EmbedQS qs = {s = qs.s} ; EmbedQS qs = {s = qs.s} ;
EmbedVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp} ; --- case,pol,agr EmbedVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp} ; --- case,pol,agr

View File

@@ -6,7 +6,6 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
param param
Prep = P_de | P_a ; Prep = P_de | P_a ;
NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
VType = VHabere | VEsse | VRefl ; VType = VHabere | VEsse | VRefl ;
oper oper
@@ -39,6 +38,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
_ => prepCase c ++ "des" _ => prepCase c ++ "des"
} ; } ;
possCase = \_,_,c -> prepCase c ;
partitive = \g,c -> case c of { partitive = \g,c -> case c of {
CPrep P_de => elisDe ; CPrep P_de => elisDe ;
_ => prepCase c ++ artDef g Sg (CPrep P_de) _ => prepCase c ++ artDef g Sg (CPrep P_de)
@@ -62,18 +63,27 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
vpAgrClit : Agr -> VPAgr = \a -> vpAgrClit : Agr -> VPAgr = \a ->
VPAgrClit (aagr a.g a.n) ; --- subty VPAgrClit (aagr a.g a.n) ; --- subty
pronArg = \n,p,acc,dat -> pronArg = pronArgGen Neg ;
-- Positive polarity is used in the imperative: stressed for 1st and
-- 2nd persons.
pronArgGen : Polarity -> Number -> Person -> CAgr -> CAgr -> Str * Str = \b,n,p,acc,dat ->
let let
cas : Person -> Case -> Case = \pr,c -> case <pr,b> of {
<P1 | P2, Pos> => CPrep P_de ; --- encoding in argPron
_ => c
} ;
pacc = case acc of { pacc = case acc of {
CRefl => case p of { CRefl => case p of {
P3 => elision "s" ; --- use of reflPron incred. expensive P3 => elision "s" ; --- use of reflPron incred. expensive
_ => argPron Fem n p Acc _ => argPron Fem n p (cas p Acc)
} ; } ;
CPron a => argPron a.g a.n a.p Acc ; CPron a => argPron a.g a.n a.p (cas a.p Acc) ;
_ => [] _ => []
} ; } ;
pdat = case dat of { pdat = case dat of {
CPron a => argPron a.g a.n a.p dative ; CPron a => argPron a.g a.n a.p (cas a.p dative) ;
_ => [] _ => []
} ; } ;
in in
@@ -88,11 +98,11 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
agr = aag ** {p = P2} ; agr = aag ** {p = P2} ;
verb = (vp.s ! VPImperat).fin ! agr ; verb = (vp.s ! VPImperat).fin ! agr ;
neg = vp.neg ! pol ; neg = vp.neg ! pol ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; clpr = pronArgGen pol agr.n agr.p vp.clAcc vp.clDat ;
compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in in
case pol of { case pol of {
Pos => verb ++ clpr.p1 ++ compl ; ---- clitics can be different Pos => verb ++ clpr.p1 ++ compl ;
Neg => neg.p1 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl Neg => neg.p1 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
} }
} ; } ;

View File

@@ -2,9 +2,9 @@ resource PhonoFre = open Prelude in {
oper oper
voyelle : Strs = strs { voyelle : Strs = strs {
"a" ; "â" ; "à" ; "e" ; "ê" ; "é" ; "è" ; "a" ; "à" ; "â " ; "e" ; "é" ; "è" ; "ê¨" ;
"h" ; "h" ;
"i" ; "î" ; "o" ; "ô" ; "u" ; "û" ; "y" "i" ; "î" ; "o" ; "ô" ; "u" ; "û" ; "y"
} ; } ;
elision : Str -> Str = \d -> d + pre {"e" ; "'" / voyelle} ; elision : Str -> Str = \d -> d + pre {"e" ; "'" / voyelle} ;

View File

@@ -80,7 +80,7 @@ lin
someSg_Det = {s = \\_,c => prepCase c ++ elision "quelqu" ; n = Sg} ; someSg_Det = {s = \\_,c => prepCase c ++ elision "quelqu" ; n = Sg} ;
something_NP = pn2np (mkPN ["quelque chose"] Masc) ; something_NP = pn2np (mkPN ["quelque chose"] Masc) ;
somewhere_Adv = ss ["quelque part"] ; --- ne - pas somewhere_Adv = ss ["quelque part"] ; --- ne - pas
that_Quant = {s = that_Quant = {s = \\_ =>
table { table {
Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; là Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; là
Pl => \\_,_ => "ces" Pl => \\_,_ => "ces"
@@ -95,7 +95,7 @@ lin
they_Pron = mkPronoun they_Pron = mkPronoun
"elles" "les" "leur" "eux" "leur" "leur" "leurs" "elles" "les" "leur" "eux" "leur" "leur" "leurs"
Fem Pl P3 ; Fem Pl P3 ;
this_Quant = {s = this_Quant = {s = \\_ =>
table { table {
Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; ci Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; ci
Pl => \\_,_ => "ces" Pl => \\_,_ => "ces"

View File

@@ -5,7 +5,7 @@ concrete IdiomGer of Idiom = CatGer **
lin lin
ExistNP np = ExistNP np =
let geben = dirV2 (mkV "geben" "gibt" "gib" "gab" "gäbe" "gegeben") let geben = dirV2 (mkV "geben" "gibt" "gib" "gab" "gäbe" "gegeben")
in in
mkClause "es" (agrP3 Sg) mkClause "es" (agrP3 Sg)
(insertObj (\\_ => appPrep geben.c2 np.s) (insertObj (\\_ => appPrep geben.c2 np.s)

View File

@@ -392,21 +392,21 @@ resource ResGer = ParamX ** open Prelude in {
mkV mkV
"haben" "habe" "hast" "hat" "habt" "hab" "haben" "habe" "hast" "hat" "habt" "hab"
"hatte" "hattest" "hatten" "hattet" "hatte" "hattest" "hatten" "hattet"
"hätte" "gehabt" "hätte" "gehabt"
[] VHaben ; [] VHaben ;
werden_V : Verb = werden_V : Verb =
mkV mkV
"werden" "werde" "wirst" "wird" "werdet" "werd" "werden" "werde" "wirst" "wird" "werdet" "werd"
"wurde" "wurdest" "wurden" "wurdet" "wurde" "wurdest" "wurden" "wurdet"
"würde" "geworden" "würde" "geworden"
[] VSein ; [] VSein ;
werdenPass : Verb = werdenPass : Verb =
mkV mkV
"werden" "werde" "wirst" "wird" "werdet" "werd" "werden" "werde" "wirst" "wird" "werdet" "werd"
"wurde" "wurdest" "wurden" "wurdet" "wurde" "wurdest" "wurden" "wurdet"
"würde" "worden" "würde" "worden"
[] VSein ; [] VSein ;
sein_V : Verb = sein_V : Verb =
@@ -414,7 +414,7 @@ resource ResGer = ParamX ** open Prelude in {
sein = mkV sein = mkV
"sein" "bin" "bist" "ist" "seid" "sei" "sein" "bin" "bist" "ist" "seid" "sei"
"war" "warst" "waren" "wart" "war" "warst" "waren" "wart"
"wäre" "gewesen" "wäre" "gewesen"
[] VSein [] VSein
in in
{s = table { {s = table {
@@ -544,7 +544,7 @@ resource ResGer = ParamX ** open Prelude in {
{n = Pl ; p = P3} => caselist "sie" "sich" "sich" "ihrer" {n = Pl ; p = P3} => caselist "sie" "sich" "sich" "ihrer"
} ; } ;
conjThat : Str = "daß" ; conjThat : Str = "daß" ;
conjThan : Str = "als" ; conjThan : Str = "als" ;

View File

@@ -6,7 +6,6 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
param param
Prep = P_di | P_a | P_da | P_in | P_su | P_con ; Prep = P_di | P_a | P_da | P_in | P_su | P_con ;
NPForm = Ton Case | Aton Case | PreClit | Poss {g : Gender ; n : Number} ; --- AAgr
VType = VHabere | VEsse | VRefl ; VType = VHabere | VEsse | VRefl ;
oper oper
@@ -56,6 +55,8 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
_ => prepCase c _ => prepCase c
} ; } ;
possCase = artDef ;
partitive = \g,c -> case c of { partitive = \g,c -> case c of {
CPrep P_di => "di" ; CPrep P_di => "di" ;
_ => prepCase c ++ artDef g Sg (CPrep P_di) _ => prepCase c ++ artDef g Sg (CPrep P_di)

View File

@@ -131,6 +131,9 @@ oper
-- All the eight personal pronouns can be built by the following macro. -- All the eight personal pronouns can be built by the following macro.
-- The use of "ne" as atonic genitive is debatable. -- The use of "ne" as atonic genitive is debatable.
-- We follow the rule that the atonic nominative is empty. -- We follow the rule that the atonic nominative is empty.
-- (The form $glie$ is no longer used, and also the other clitics are
-- given in $DiffIta.argPron$ and therefore wouldn't be needed in the
-- pronoun itself.)
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
@@ -143,7 +146,6 @@ oper
Aton (CPrep P_di) => "ne" ; --- hmm Aton (CPrep P_di) => "ne" ; --- hmm
Aton (CPrep P_a) => lui ; Aton (CPrep P_a) => lui ;
Aton q => prepCase q ++ Lui ; ---- GF bug with c or p! Aton q => prepCase q ++ Lui ; ---- GF bug with c or p!
PreClit => glie ;
Poss {n = Sg ; g = Masc} => son ; Poss {n = Sg ; g = Masc} => son ;
Poss {n = Sg ; g = Fem} => sa ; Poss {n = Sg ; g = Fem} => sa ;
Poss {n = Pl ; g = Masc} => ses ; Poss {n = Pl ; g = Masc} => ses ;

View File

@@ -80,7 +80,7 @@ lin
something_NP = pn2np (mkPN ["qualche cosa"] Masc) ; something_NP = pn2np (mkPN ["qualche cosa"] Masc) ;
somewhere_Adv = ss ["qualche parte"] ; somewhere_Adv = ss ["qualche parte"] ;
that_Quant = { that_Quant = {
s = table { s = \\_ => table {
Sg => \\g,c => prepCase c ++ genForms "quello" "quella" ! g ; Sg => \\g,c => prepCase c ++ genForms "quello" "quella" ! g ;
Pl => \\g,c => prepCase c ++ genForms "quelli" "quelle" ! g ---- quegli Pl => \\g,c => prepCase c ++ genForms "quelli" "quelle" ! g ---- quegli
} }
@@ -95,7 +95,7 @@ lin
"loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro" "loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro"
Fem Pl P3 ; Fem Pl P3 ;
this_Quant = { this_Quant = {
s = table { s = \\_ => table {
Sg => \\g,c => prepCase c ++ genForms "questo" "questa" ! g ; Sg => \\g,c => prepCase c ++ genForms "questo" "questa" ! g ;
Pl => \\g,c => prepCase c ++ genForms "questi" "queste" ! g Pl => \\g,c => prepCase c ++ genForms "questi" "queste" ! g
} }

View File

@@ -11,7 +11,7 @@ concrete IdiomNor of Idiom = CatNor **
GenericCl vp = mkClause "man" (agrP3 neutrum Sg) vp ; GenericCl vp = mkClause "man" (agrP3 neutrum Sg) vp ;
ProgrVP vp = ProgrVP vp =
insertObj (\\a => ["ved å"] ++ infVP vp a) (predV verbBe) ; insertObj (\\a => ["ved å"] ++ infVP vp a) (predV verbBe) ;
} }

View File

@@ -220,7 +220,7 @@ oper
--3 Deponent verbs. --3 Deponent verbs.
-- --
-- Some words are used in passive forms only, e.g. "hoppas", some as -- Some words are used in passive forms only, e.g. "hoppas", some as
-- reflexive e.g. "ångra sig". -- reflexive e.g. "ångra sig".
depV : V -> V ; depV : V -> V ;
reflV : V -> V ; reflV : V -> V ;
@@ -369,7 +369,7 @@ oper
mkV0 v = v ** {lock_V0 = <>} ; mkV0 v = v ** {lock_V0 = <>} ;
mkVS v = v ** {lock_VS = <>} ; mkVS v = v ** {lock_VS = <>} ;
mkV2S v p = mkV2 v p ** {lock_V2S = <>} ; mkV2S v p = mkV2 v p ** {lock_V2S = <>} ;
mkVV v = v ** {c2 = "å" ; lock_VV = <>} ; mkVV v = v ** {c2 = "å" ; lock_VV = <>} ;
mkV2V v p t = mkV2 v p ** {s3 = t ; lock_V2V = <>} ; mkV2V v p t = mkV2 v p ** {s3 = t ; lock_V2V = <>} ;
mkVA v = v ** {lock_VA = <>} ; mkVA v = v ** {lock_VA = <>} ;
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ; mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;

View File

@@ -49,10 +49,10 @@ incomplete concrete CatRomance of Cat =
NP,Pron = Pronoun ; NP,Pron = Pronoun ;
Det = {s : Gender => Case => Str ; n : Number} ; Det = {s : Gender => Case => Str ; n : Number} ;
QuantSg = {s : Gender => Case => Str} ; QuantSg = {s : Gender => Case => Str} ;
QuantPl = {s : Gender => Case => Str} ; QuantPl = {s : Bool => Gender => Case => Str} ;
Quant = {s : Number => Gender => Case => Str} ; Quant = {s : Bool => Number => Gender => Case => Str} ;
Predet = {s : AAgr => Case => Str ; c : Case} ; -- la plupart de... Predet = {s : AAgr => Case => Str ; c : Case} ; -- la plupart de...
Num = {s : Gender => Str} ; Num = {s : Gender => Str ; isNum : Bool} ;
Ord = {s : AAgr => Str} ; Ord = {s : AAgr => Str} ;
-- Adverb -- Adverb

View File

@@ -15,11 +15,6 @@ interface DiffRomance = open CommonRomance, Prelude in {
param Prep ; param Prep ;
-- Forms of noun phrases. Spanish and Italian have special forms for
-- fronted clitics.
param NPForm ;
-- Which types of verbs exist, in terms of auxiliaries. -- Which types of verbs exist, in terms of auxiliaries.
-- (Fre, Ita "avoir", "être", and refl; Spa only "haber" and refl). -- (Fre, Ita "avoir", "être", and refl; Spa only "haber" and refl).
@@ -55,8 +50,10 @@ interface DiffRomance = open CommonRomance, Prelude in {
--2 Constants that must derivatively depend on language --2 Constants that must derivatively depend on language
dative : Case ; param NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
genitive : Case ;
oper dative : Case ;
oper genitive : Case ;
vRefl : VType ; vRefl : VType ;
isVRefl : VType -> Bool ; isVRefl : VType -> Bool ;
@@ -71,6 +68,10 @@ interface DiffRomance = open CommonRomance, Prelude in {
artDef : Gender -> Number -> Case -> Str ; artDef : Gender -> Number -> Case -> Str ;
artIndef : Gender -> Number -> Case -> Str ; artIndef : Gender -> Number -> Case -> Str ;
-- This is the definite article in Italian, $prepCase c$ in French and Spanish.
possCase : Gender -> Number -> Case -> Str ;
auxVerb : VType -> (VF => Str) ; auxVerb : VType -> (VF => Str) ;
negation : Polarity => (Str * Str) ; negation : Polarity => (Str * Str) ;
copula : Verb ; copula : Verb ;
@@ -81,7 +82,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
relPron : Bool => AAgr => Case => Str ; relPron : Bool => AAgr => Case => Str ;
pronSuch : AAgr => Str ; pronSuch : AAgr => Str ;
partQIndir : Str ; -- ce, ciò partQIndir : Str ; -- ce, ciò
reflPron : Number -> Person -> Case -> Str ; reflPron : Number -> Person -> Case -> Str ;
-- argPron : Gender -> Number -> Person -> Case -> Str ; -- argPron : Gender -> Number -> Person -> Case -> Str ;

View File

@@ -30,36 +30,36 @@ incomplete concrete NounRomance of Noun =
n = Sg n = Sg
} ; } ;
DetPl quant num ord = { DetPl quant num ord = {
s = \\g,c => quant.s ! g ! c ++ num.s ! g ++ ord.s ! aagr g Pl ; s = \\g,c => quant.s ! num.isNum ! g ! c ++ num.s ! g ++ ord.s ! aagr g Pl ;
n = Pl n = Pl
} ; } ;
SgQuant q = {s = q.s ! Sg} ; SgQuant q = {s = q.s ! False ! Sg} ;
PlQuant q = {s = q.s ! Pl} ; PlQuant q = {s = \\b => q.s ! b ! Pl} ;
PossPron p = { PossPron p = {
s = \\n,g,c => prepCase c ++ p.s ! Poss (aagr g n) ---- il mio! s = \\_,n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ---- il mio!
} ; } ;
NoNum = {s = \\_ => []} ; NoNum = {s = \\_ => [] ; isNum = False} ;
NoOrd = {s = \\_ => []} ; NoOrd = {s = \\_ => []} ;
NumInt n = {s = \\_ => n.s} ; NumInt n = {s = \\_ => n.s ; isNum = True} ;
OrdInt n = {s = \\_ => n.s ++ "ème"} ; --- OrdInt n = {s = \\_ => n.s ++ "."} ; ---
NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ; NumNumeral numeral = {s = \\g => numeral.s ! NCard g ; isNum = True} ;
OrdNumeral numeral = {s = \\a => numeral.s ! NOrd a.g a.n} ; OrdNumeral numeral = {s = \\a => numeral.s ! NOrd a.g a.n} ;
AdNum adn num = {s = \\a => adn.s ++ num.s ! a} ; AdNum adn num = {s = \\a => adn.s ++ num.s ! a ; isNum = num.isNum} ;
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ; OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
DefArt = { DefArt = {
s = \\n,g,c => artDef g n c s = \\_,n,g,c => artDef g n c
} ; } ;
IndefArt = { IndefArt = {
s = \\n,g,c => artIndef g n c s = \\b,n,g,c => if_then_Str b [] (artIndef g n c) ;
} ; } ;
MassDet = { MassDet = {

View File

@@ -29,8 +29,7 @@ oper
npform2case : NPForm -> Case = \p -> case p of { npform2case : NPForm -> Case = \p -> case p of {
Ton x => x ; Ton x => x ;
Poss _ => genitive ; Poss _ => genitive ;
Aton x => x ; Aton x => x
_ => dative ---- Ita PreClit
} ; } ;
case2npform : Case -> NPForm = \c -> case c of { case2npform : Case -> NPForm = \c -> case c of {

View File

@@ -43,7 +43,7 @@ interface DiffScand = open CommonScand, Prelude in {
relPron : GenNum => RCase => Str ; relPron : GenNum => RCase => Str ;
-- Pronoun "sådan" used in $Relative.RelCl$. -- Pronoun "sådan" used in $Relative.RelCl$.
pronSuch : GenNum => Str ; pronSuch : GenNum => Str ;

View File

@@ -6,7 +6,6 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
param param
Prep = P_de | P_a ; Prep = P_de | P_a ;
NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
VType = VHabere | VRefl ; VType = VHabere | VRefl ;
oper oper
@@ -37,6 +36,8 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
_ => prepCase c ++ genForms "unos" "unas" ! g _ => prepCase c ++ genForms "unos" "unas" ! g
} ; } ;
possCase = \_,_,c -> prepCase c ;
partitive = \g,c -> case c of { partitive = \g,c -> case c of {
CPrep P_de => "de" ; CPrep P_de => "de" ;
_ => prepCase c ++ artDef g Sg (CPrep P_de) _ => prepCase c ++ artDef g Sg (CPrep P_de)

View File

@@ -16,7 +16,7 @@ lincat Sub1000000 = {s : Gender => Str ; n : Number} ;
lin num x = { lin num x = {
s = table { s = table {
NCard g => x.s ! g ; NCard g => x.s ! g ;
NOrd _ _ => "número" ++ x.s ! Masc ---- TODO NOrd _ _ => "número" ++ x.s ! Masc ---- TODO
} }
} ; } ;
lin n2 = lin n2 =

View File

@@ -85,7 +85,7 @@ lin
something_NP = pn2np (mkPN ["algo"] Masc) ; something_NP = pn2np (mkPN ["algo"] Masc) ;
somewhere_Adv = ss ["en ninguna parte"] ; somewhere_Adv = ss ["en ninguna parte"] ;
that_Quant = { that_Quant = {
s = table { s = \\_ => table {
Sg => \\g,c => prepCase c ++ genForms "ese" "esa" ! g ; Sg => \\g,c => prepCase c ++ genForms "ese" "esa" ! g ;
Pl => \\g,c => prepCase c ++ genForms "esos" "esas" ! g Pl => \\g,c => prepCase c ++ genForms "esos" "esas" ! g
} }
@@ -101,7 +101,7 @@ lin
"su" "su" "sus" "sus" "su" "su" "sus" "sus"
Fem Pl P3 ; Fem Pl P3 ;
this_Quant = { this_Quant = {
s = table { s = \\_ => table {
Sg => \\g,c => prepCase c ++ genForms "este" "esta" ! g ; Sg => \\g,c => prepCase c ++ genForms "este" "esta" ! g ;
Pl => \\g,c => prepCase c ++ genForms "estos" "estas" ! g Pl => \\g,c => prepCase c ++ genForms "estos" "estas" ! g
} }