mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -06:00
query language extended and generalized
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -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}} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user