query language extended and generalized

This commit is contained in:
aarne
2010-06-19 10:29:06 +00:00
parent cca3039505
commit d9c34ce848
8 changed files with 174 additions and 61 deletions

View File

@@ -63,5 +63,11 @@ abstract Extra = Cat ** {
UseFoc : Temp -> Pol -> Foc -> Utt ;
cat
[CN] {2} ;
fun
ConjCN : Conj -> [CN] -> CN ; -- (every) man and woman
PartVP : VP -> AP ; -- looking at Mary
}

View File

@@ -65,7 +65,8 @@ abstract Verb = Cat ** {
-- Adjectival phrases, noun phrases, and adverbs can be used.
CompAP : AP -> Comp ; -- (be) small
CompNP : NP -> Comp ; -- (be) a man
CompNP : NP -> Comp ; -- (be) the man
CompAdv : Adv -> Comp ; -- (be) here
CompCN : CN -> Comp ; -- (be) a man/men
}

View File

@@ -97,4 +97,16 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
IAdvAdv adv = {s = "how" ++ adv.s} ;
lincat
[CN] = {s1,s2 : Number => Case => Str} ;
lin
BaseCN = twoTable2 Number Case ;
ConsCN = consrTable2 Number Case comma ;
ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
PartVP vp = {
s = \\a => vp.ad ++ vp.prp ++ vp.s2 ! a ;
isPre = False ---- depends on whether there are complements
} ;
}

View File

@@ -9,5 +9,7 @@ oper
lin NP (regNP s n) ;
mkIDet : Str -> ParadigmsEng.Number -> IDet = \s,n ->
lin IDet {s = s ; n = n} ;
mkIQuant : Str -> Str -> IQuant = \s,n ->
lin IQuant {s = table {Sg => s ; Pl => n}} ;
}

View File

@@ -46,5 +46,10 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
CompAP ap = ap ;
CompNP np = {s = \\_ => np.s ! Acc} ;
CompAdv a = {s = \\_ => a.s} ;
CompCN cn = {s = \\a => case (fromAgr a).n of {
Sg => artIndef ++ cn.s ! Sg ! Nom ;
Pl => cn.s ! Pl ! Nom
}
} ;
}