forked from GitHub/gf-rgl
swadesh fixes; bug fix in i -old
This commit is contained in:
@@ -226,6 +226,8 @@ oper mkTal : Str -> Str -> Str -> {s : DForm => Str} =
|
|||||||
\to, tolv, tyve ->
|
\to, tolv, tyve ->
|
||||||
{s = table {ental => to ; ton => tolv ; tiotal => tyve}} ;
|
{s = table {ental => to ; ton => tolv ; tiotal => tyve}} ;
|
||||||
oper regTal : Str -> {s : DForm => Str} = \fem -> mkTal fem (fem + "ton") (fem + "tio") ;
|
oper regTal : Str -> {s : DForm => Str} = \fem -> mkTal fem (fem + "ton") (fem + "tio") ;
|
||||||
|
numPl : Str -> {s : Gender => Str ; n : Number} = \n ->
|
||||||
|
{s = \\_ => n ; n = Pl} ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
-- AR 12/10/2002 following www.geocities.com/tsca.geo/dansk/dknummer.html
|
-- AR 12/10/2002 following www.geocities.com/tsca.geo/dansk/dknummer.html
|
||||||
|
|
||||||
concrete NumeralsDan of Numerals = open Prelude, MorphoDan in {
|
concrete NumeralsDan of Numerals = open Prelude, TypesDan, MorphoDan in {
|
||||||
|
|
||||||
lincat Numeral = {s : Str} ;
|
lincat
|
||||||
lincat Digit = {s : DForm => Str} ;
|
Numeral = {s : Gender => Str ; n : Number} ;
|
||||||
lincat Sub10 = {s : DForm => Str} ;
|
Digit = {s : DForm => Str} ;
|
||||||
lincat Sub100 = {s : Str} ;
|
Sub10 = {s : DForm => Gender => Str ; n : Number} ;
|
||||||
lincat Sub1000 = {s : Str} ;
|
Sub100 = {s : Gender => Str ; n : Number} ;
|
||||||
lincat Sub1000000 = {s : Str} ;
|
Sub1000 = {s : Gender => Str ; n : Number} ;
|
||||||
|
Sub1000000 = {s : Gender => Str ; n : Number} ;
|
||||||
|
|
||||||
lin num x = x ;
|
lin num x = x ;
|
||||||
|
|
||||||
@@ -20,18 +21,20 @@ lin n7 = mkTal "syv" "sytten" "halvfjerds" ;
|
|||||||
lin n8 = mkTal "otte" "atten" "firs" ;
|
lin n8 = mkTal "otte" "atten" "firs" ;
|
||||||
lin n9 = mkTal "ni" "nitten" "halvfems" ;
|
lin n9 = mkTal "ni" "nitten" "halvfems" ;
|
||||||
|
|
||||||
lin pot01 = {s = table {f => "en"}} ; ---
|
pot01 = {s = table {f => table {Neutr => "et" ; _ => "en"}} ; n = Sg} ;
|
||||||
lin pot0 d = {s = table {f => d.s ! f}} ;
|
pot0 d = {s = \\f,g => d.s ! f ; n = Pl} ;
|
||||||
lin pot110 = ss "ti" ;
|
pot110 = numPl "ti" ;
|
||||||
lin pot111 = ss "elleve" ;
|
pot111 = numPl "elleve" ;
|
||||||
lin pot1to19 d = ss (d.s ! ton) ;
|
pot1to19 d = numPl (d.s ! ton) ;
|
||||||
lin pot0as1 n = ss (n.s ! ental) ;
|
pot0as1 n = {s = n.s ! ental ; n = n.n} ;
|
||||||
lin pot1 d = ss (d.s ! tiotal) ;
|
pot1 d = numPl (d.s ! tiotal) ;
|
||||||
lin pot1plus d e = ss (e.s ! ental ++ "og" ++ d.s ! tiotal) ;
|
pot1plus d e = {s = \\g => e.s ! ental ! g ++ "og" ++ d.s ! tiotal ; n = Pl} ;
|
||||||
lin pot1as2 n = n ;
|
pot1as2 n = n ;
|
||||||
lin pot2 d = ss (d.s ! ental ++ "hundrede") ;
|
pot2 d = numPl (d.s ! ental ! Neutr ++ "hundrede") ;
|
||||||
lin pot2plus d e = ss (d.s ! ental ++ "hundrede" ++ "og" ++ e.s) ;
|
pot2plus d e =
|
||||||
lin pot2as3 n = n ;
|
{s = \\g => d.s ! ental ! Neutr ++ "hundrede" ++ "og" ++ e.s ! g ; n = Pl} ;
|
||||||
lin pot3 n = ss (n.s ++ "tusind") ;
|
pot2as3 n = n ;
|
||||||
lin pot3plus n m = ss (n.s ++ "tusind" ++ "og" ++ m.s) ; ---
|
pot3 n = numPl (n.s ! Neutr ++ "tusind") ;
|
||||||
|
pot3plus n m = {s = \\g => n.s ! Neutr ++ "tusind" ++ "og" ++ m.s ! g ; n = Pl} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,10 @@ concrete StructuralDan of Structural =
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
UseNumeral i = {s = table {Nom => i.s ; Gen => i.s ++ "s"}} ; ---
|
UseNumeral i = {
|
||||||
|
s = \\g => table {Nom => i.s ! g ; Gen => i.s ! g ++ "s"} ; ---
|
||||||
|
n = i.n
|
||||||
|
} ;
|
||||||
|
|
||||||
above_Prep = ss "ovenfor" ;
|
above_Prep = ss "ovenfor" ;
|
||||||
after_Prep = ss "efter" ;
|
after_Prep = ss "efter" ;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ lincat
|
|||||||
N2 = Function ;
|
N2 = Function ;
|
||||||
-- = CommNounPhrase ** {s2 : Preposition} ;
|
-- = CommNounPhrase ** {s2 : Preposition} ;
|
||||||
N3 = Function ** {s3 : Preposition} ;
|
N3 = Function ** {s3 : Preposition} ;
|
||||||
Num = {s : Case => Str} ;
|
Num = {s : Case => Str ; n : Number} ;
|
||||||
Prep = {s : Str} ;
|
Prep = {s : Str} ;
|
||||||
|
|
||||||
A = Adjective ;
|
A = Adjective ;
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
concrete NumeralsEng of Numerals = open Prelude, MorphoEng in {
|
concrete NumeralsEng of Numerals = open Prelude, MorphoEng in {
|
||||||
|
|
||||||
lincat Numeral = { s : Str } ;
|
lincat Numeral = {s : Str ; n : Number} ;
|
||||||
lincat Digit = {s : DForm => Str} ;
|
lincat Digit = {s : DForm => Str} ;
|
||||||
lincat Sub10 = {s : DForm => Str} ;
|
lincat Sub10 = {s : DForm => Str ; n : Number} ;
|
||||||
|
Sub100 = {s : Str ; n : Number} ;
|
||||||
|
Sub1000 = {s : Str ; n : Number} ;
|
||||||
|
Sub1000000 = {s : Str ; n : Number} ;
|
||||||
|
|
||||||
lin num x = x ;
|
lin num x = x ;
|
||||||
lin n2 = mkNum "two" "twelve" "twenty" ;
|
lin n2 = mkNum "two" "twelve" "twenty" ;
|
||||||
@@ -14,19 +17,19 @@ lin n7 = regNum "seven" ;
|
|||||||
lin n8 = mkNum "eight" "eighteen" "eighty" ;
|
lin n8 = mkNum "eight" "eighteen" "eighty" ;
|
||||||
lin n9 = regNum "nine" ;
|
lin n9 = regNum "nine" ;
|
||||||
|
|
||||||
lin pot01 = {s = table {f => "one"}} ;
|
lin pot01 = {s = table {f => "one"} ; n = Sg} ;
|
||||||
lin pot0 d = {s = table {f => d.s ! f}} ;
|
lin pot0 d = {s = table {f => d.s ! f} ; n = Pl} ;
|
||||||
lin pot110 = ss "ten" ;
|
lin pot110 = ss "ten" ** {n = Pl} ;
|
||||||
lin pot111 = ss "eleven" ;
|
lin pot111 = ss "eleven" ** {n = Pl} ;
|
||||||
lin pot1to19 d = {s = d.s ! teen} ;
|
lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
|
||||||
lin pot0as1 n = {s = n.s ! unit} ;
|
lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ;
|
||||||
lin pot1 d = {s = d.s ! ten} ;
|
lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
|
||||||
lin pot1plus d e = {s = d.s ! ten ++ "-" ++ e.s ! unit} ;
|
lin pot1plus d e = {s = d.s ! ten ++ "-" ++ e.s ! unit} ** {n = Pl} ;
|
||||||
lin pot1as2 n = n ;
|
lin pot1as2 n = n ;
|
||||||
lin pot2 d = {s = d.s ! unit ++ "hundred"} ;
|
lin pot2 d = {s = d.s ! unit ++ "hundred"} ** {n = Pl} ;
|
||||||
lin pot2plus d e = {s = d.s ! unit ++ "hundred" ++ "and" ++ e.s} ;
|
lin pot2plus d e = {s = d.s ! unit ++ "hundred" ++ "and" ++ e.s} ** {n = Pl} ;
|
||||||
lin pot2as3 n = n ;
|
lin pot2as3 n = n ;
|
||||||
lin pot3 n = {s = n.s ++ "thousand"} ;
|
lin pot3 n = {s = n.s ++ "thousand"} ** {n = Pl} ;
|
||||||
lin pot3plus n m = {s = n.s ++ "thousand" ++ m.s} ;
|
lin pot3plus n m = {s = n.s ++ "thousand" ++ m.s} ** {n = Pl} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ lin
|
|||||||
ModGenOne = npGenDet singular noNum ;
|
ModGenOne = npGenDet singular noNum ;
|
||||||
ModGenNum = npGenDet plural ;
|
ModGenNum = npGenDet plural ;
|
||||||
|
|
||||||
UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "s"}} ; ---
|
UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "s"} ; n = Pl} ; ---
|
||||||
NoNum = noNum ;
|
NoNum = noNum ;
|
||||||
|
|
||||||
UseA = adj2adjPhrase ;
|
UseA = adj2adjPhrase ;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ concrete StructuralEng of Structural =
|
|||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
UseNumeral i = {s = table {Nom => i.s ; Gen => i.s ++ "'s"}} ; ---
|
UseNumeral i = {s = table {Nom => i.s ; Gen => i.s ++ "'s"} ; n = i.n} ; ---
|
||||||
|
|
||||||
|
|
||||||
above_Prep = ss "above" ;
|
above_Prep = ss "above" ;
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ oper
|
|||||||
-- The following construction has to be refined for genitive forms:
|
-- The following construction has to be refined for genitive forms:
|
||||||
-- "we two", "us two" are OK, but "our two" is not.
|
-- "we two", "us two" are OK, but "our two" is not.
|
||||||
|
|
||||||
Numeral : Type = {s : Case => Str} ;
|
Numeral : Type = {s : Case => Str ; n : Number} ;
|
||||||
|
|
||||||
pronWithNum : Pronoun -> Numeral -> Pronoun = \we,two ->
|
pronWithNum : Pronoun -> Numeral -> Pronoun = \we,two ->
|
||||||
{s = \\c => we.s ! c ++ two.s ! toCase c ; n = we.n ; p = we.p ; g
|
{s = \\c => we.s ! c ++ two.s ! toCase c ; n = we.n ; p = we.p ; g
|
||||||
= human} ;
|
= human} ;
|
||||||
|
|
||||||
noNum : Numeral = {s = \\_ => []} ;
|
noNum : Numeral = {s = \\_ => [] ; n = Pl} ;
|
||||||
|
|
||||||
pronNounPhrase : Pronoun -> NounPhrase = \pro ->
|
pronNounPhrase : Pronoun -> NounPhrase = \pro ->
|
||||||
{s = pro.s ; a = toAgr pro.n pro.p pro.g} ;
|
{s = pro.s ; a = toAgr pro.n pro.p pro.g} ;
|
||||||
@@ -101,13 +101,13 @@ oper
|
|||||||
|
|
||||||
numDetNounPhrase : DeterminerNum -> Numeral -> CommNounPhrase -> NounPhrase =
|
numDetNounPhrase : DeterminerNum -> Numeral -> CommNounPhrase -> NounPhrase =
|
||||||
\all, six, men ->
|
\all, six, men ->
|
||||||
{s = \\c => all.s ++ six.s ! Nom ++ men.s ! Pl ! toCase c ;
|
{s = \\c => all.s ++ six.s ! Nom ++ men.s ! six.n ! toCase c ;
|
||||||
a = toAgr Pl P3 men.g
|
a = toAgr six.n P3 men.g
|
||||||
} ;
|
} ;
|
||||||
justNumDetNounPhrase : DeterminerNum -> Numeral -> NounPhrase =
|
justNumDetNounPhrase : DeterminerNum -> Numeral -> NounPhrase =
|
||||||
\all, six ->
|
\all, six ->
|
||||||
{s = \\c => all.s ++ six.s ! toCase c ;
|
{s = \\c => all.s ++ six.s ! toCase c ;
|
||||||
a = toAgr Pl P3 Neutr --- gender does not matter
|
a = toAgr six.n P3 Neutr --- gender does not matter
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkDeterminer : Number -> Str -> Determiner = \n,the ->
|
mkDeterminer : Number -> Str -> Determiner = \n,the ->
|
||||||
@@ -142,9 +142,14 @@ oper
|
|||||||
\n,two,man ->
|
\n,two,man ->
|
||||||
{s = \\c => case n of {
|
{s = \\c => case n of {
|
||||||
Sg => artIndef ++ two.s ! Nom ++ man.s ! n ! toCase c ;
|
Sg => artIndef ++ two.s ! Nom ++ man.s ! n ! toCase c ;
|
||||||
Pl => two.s ! Nom ++ man.s ! n ! toCase c
|
Pl => two.s ! Nom ++ man.s ! two.n ! toCase c
|
||||||
} ;
|
} ;
|
||||||
a = toAgr n P3 man.g
|
a = toAgr nb P3 man.g where {
|
||||||
|
nb = case <n,two.n> of {
|
||||||
|
<Pl,Pl> => Pl ;
|
||||||
|
_ => Sg
|
||||||
|
}
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n ->
|
defNounPhrase : Number -> CommNounPhrase -> NounPhrase = \n ->
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ oper
|
|||||||
{s = np.s ; g = np.g ; p = np.p ; c = np.c ; n = n ; lock_NP = <>} ;
|
{s = np.s ; g = np.g ; p = np.p ; c = np.c ; n = n ; lock_NP = <>} ;
|
||||||
|
|
||||||
mkA a b c d = mkAdj a c b d ** {p = False ; lock_A = <>} ;
|
mkA a b c d = mkAdj a c b d ** {p = False ; lock_A = <>} ;
|
||||||
regA a = mkAdjReg a False ** {p = False ; lock_A = <>} ;
|
regA a = mkAdjReg a ** {p = False ; lock_A = <>} ;
|
||||||
prefA a = {s = a.s ; p = True ; lock_A = <>} ;
|
prefA a = {s = a.s ; p = True ; lock_A = <>} ;
|
||||||
|
|
||||||
mkA2 a p = a ** {c = p.p1 ; s2 = p.p2 ; lock_A2 = <>} ;
|
mkA2 a p = a ** {c = p.p1 ; s2 = p.p2 ; lock_A2 = <>} ;
|
||||||
|
|||||||
@@ -76,9 +76,6 @@ oper
|
|||||||
_ => (personPron Masc n p).s
|
_ => (personPron Masc n p).s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkAdjReg : Str -> Bool -> Adjective = \adj,p ->
|
|
||||||
mkAdjective (adjGrand adj) p ;
|
|
||||||
|
|
||||||
comparConj = elisQue ;
|
comparConj = elisQue ;
|
||||||
|
|
||||||
mkAdjDegrReg : Str -> Bool -> AdjDegr = \adj,p ->
|
mkAdjDegrReg : Str -> Bool -> AdjDegr = \adj,p ->
|
||||||
|
|||||||
@@ -594,6 +594,14 @@ oper
|
|||||||
|
|
||||||
reflPron : Number => Person => NPFormA => Str ;
|
reflPron : Number => Person => NPFormA => Str ;
|
||||||
|
|
||||||
|
reflPronNounPhrase : Gender -> Number -> Person -> NounPhrase = \g,n,p ->
|
||||||
|
{s = reflPron ! n ! p ;
|
||||||
|
g = PGen g ; -- needed in participle agreement
|
||||||
|
n = n ;
|
||||||
|
p = p ;
|
||||||
|
c = Clit1 ---- depends on person?
|
||||||
|
} ;
|
||||||
|
|
||||||
---- There is no adverbial form for the past participle.
|
---- There is no adverbial form for the past participle.
|
||||||
|
|
||||||
adjPastPart : Verb -> Adjective = \verb -> {
|
adjPastPart : Verb -> Adjective = \verb -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user