Merge private git for latim grammar into official darcs.

See https://github.com/daherb/GF orhttps://gitlab.cip.ifi.lmu.de/langeh/gf 
for full git commit history
This commit is contained in:
Herbert Lange
2013-09-03 17:13:58 +00:00
parent d2ea52e0ec
commit 1f91d2287b
55 changed files with 52150 additions and 1606 deletions

View File

@@ -1,16 +1,25 @@
concrete NounLat of Noun = CatLat ** open ResLat, Prelude in {
concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
flags optimize=all_subs ;
lin
DetCN det cn = {
s = \\c => det.s ! cn.g ! c ++ cn.s ! det.n ! c ;
n = det.n ; g = cn.g ; p = P3
DetCN det cn = -- Det -> CN -> NP
{
s = \\c => det.s ! cn.g ! c ++ cn.preap.s ! (Ag cn.g det.n c) ++ cn.s ! det.n ! c ++ cn.postap.s ! (Ag cn.g det.n c) ;
n = det.n ; g = cn.g ; p = P3 ;
} ;
-- UsePN pn = pn ** {a = agrgP3 Sg pn.g} ;
UsePron p = p ;
UsePN pn = lin NP { s = pn.s ! Sg ; g = pn.g ; n = Sg ; p = P3 } ;
UsePron p = -- Pron -> Np
{
g = p.g ;
n = p.n ;
p = p.p ;
s = \\c => case c of {
Nom => p.pers ! PronDrop ! PronRefl ; -- Drop pronoun in nominative case
_ => p.pers ! PronNonDrop ! PronRefl -- but don't drop it otherwise
} ! c ;
} ;
-- PredetNP pred np = {
-- s = \\c => pred.s ++ np.s ! c ;
-- a = np.a
@@ -38,15 +47,15 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude in {
-- } ;
--
DetQuant quant num = {
s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ! g ! c ;
sp = \\g,c => quant.sp ! num.n ! g ! c ++ num.s ! g ! c ;
s = \\g,c => quant.s ! Ag g num.n c ++ num.s ! g ! c ;
sp = \\g,c => quant.sp ! Ag g num.n c ++ num.s ! g ! c ;
n = num.n
} ;
DetNP det = {
s = det.sp ! Neutr ;
g = Neutr ; n = det.n ; p = P3
} ;
-- DetNP det = {
-- s = det.sp ! Neutr ;
-- g = Neutr ; n = det.n ; p = P3
-- } ;
-- PossPron p = {
-- s = \\_,_ => p.s ! Gen ;
@@ -69,30 +78,26 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude in {
-- OrdSuperl a = {s = a.s ! AAdj Superl} ;
DefArt = {
s = \\_,_,_ => [] ;
sp = \\n,g => (personalPronoun g n P3).s
s = \\_ => [] ;
sp = \\_ => [] ;
} ;
-- IndefArt = {
-- s = \\c,n => case <n,c> of {
-- <Sg,False> => artIndef ;
-- _ => []
-- } ;
-- sp = \\c,n => case <n,c> of {
-- <Sg,False> => "one" ;
-- <Pl,False> => "ones" ;
-- _ => []
-- }
-- } ;
--
-- MassNP cn = {
-- s = cn.s ! Sg ;
-- a = agrP3 Sg
-- } ;
--
UseN n = n ;
-- UseN2 n = n ;
-----b UseN3 n = n ;
IndefArt = {
s = \\_ => [] ;
sp = \\_ => [] ;
} ;
-- MassNP cn = {
-- s = cn.s ! Sg ;
-- a = Ag cn.g Sg
-- } ;
UseN n = -- N -> CN
lin CN ( n ** {preap, postap = {s = \\_ => "" } } ) ;
UseN2 n2 = -- N2 -> CN
lin CN ( n2 ** {preap, postap = {s = \\_ => "" } } ) ;
-----b UseN3 n = n ;
--
-- Use2N3 f = {
-- s = \\n,c => f.s ! n ! Nom ;
@@ -113,9 +118,20 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude in {
-- c2 = f.c3
-- } ;
AdjCN ap cn = {
s = \\n,c => preOrPost ap.isPre (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
g = cn.g
param
AdjPos = Pre | Post ;
lin
AdjCN ap cn = -- AP -> CN -> CN
let pos = variants { Post ; Pre }
in
{
-- s = \\n,c => preOrPost ap.isPre (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
-- s = \\n,c => ( cn.s ! n ! c ) ++ ( ap.s ! AdjPhr cn.g n c) ; -- always add adjectives after noun?
s = cn.s ;
postap = case pos of { Pre => cn.postap ; Post => { s = \\a => ap.s ! a ++ cn.postap.s ! a } } ;
preap = case pos of { Pre => { s = \\a => ap.s ! a ++ cn.preap.s ! a } ; Post => cn.preap } ;
-- variants { postap = ConsAP postap ap ; preap = ConsAP preap ap } ; -- Nice if that would work
g = cn.g
} ;
-- RelCN cn rs = {
@@ -123,7 +139,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude in {
-- g = cn.g
-- } ;
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
--