mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -06:00
completing resource api with things needed in WebALT
This commit is contained in:
@@ -34,7 +34,11 @@ incomplete resource Combinators = open Grammar in {
|
||||
app : N2 -> NP -> NP ;
|
||||
app : N3 -> NP -> NP -> NP ;
|
||||
app : N2 -> NP -> NP -> NP ;
|
||||
app : N2 -> N -> CN
|
||||
app : N2 -> N -> CN ;
|
||||
|
||||
app : N2 -> NP -> CN ; -- divisor of x
|
||||
app : N3 -> NP -> NP -> CN ; -- path from x to y
|
||||
app : N2 -> NP -> NP -> CN ; -- path between x and y
|
||||
} ;
|
||||
|
||||
--2 Coordination
|
||||
@@ -126,7 +130,12 @@ incomplete resource Combinators = open Grammar in {
|
||||
app : N2 -> NP -> NP -> NP
|
||||
= \n,x,y -> (DetArtSg DefArt (ComplN2 n (ConjNP and_Conj (BaseNP x y)))) ;
|
||||
app : N2 -> N -> CN
|
||||
= \f,n -> ComplN2 f (DetArtPl (IndefArt) (UseN n))
|
||||
= \f,n -> ComplN2 f (DetArtPl (IndefArt) (UseN n)) ;
|
||||
|
||||
app : N2 -> NP -> CN = ComplN2 ;
|
||||
app : N3 -> NP -> NP -> CN = \n,x,y -> ComplN2 (ComplN3 n x) y ;
|
||||
app : N2 -> NP -> NP -> CN = \n,x,y ->
|
||||
ComplN2 n (ConjNP and_Conj (BaseNP x y)) ;
|
||||
} ;
|
||||
|
||||
coord = overload {
|
||||
|
||||
3
lib/resource/api/CombinatorsSwe.gf
Normal file
3
lib/resource/api/CombinatorsSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsSwe = Combinators with (Grammar = GrammarSwe) ;
|
||||
@@ -444,10 +444,11 @@ incomplete resource Constructors = open Grammar in {
|
||||
mkNum : overload {
|
||||
mkNum : Numeral -> Num ; -- 1. twenty
|
||||
mkNum : Digits -> Num ; -- 2. 51
|
||||
mkNum : Card -> Num ; -- 3. twenty
|
||||
|
||||
-- A numeral can be modified by an adnumeral.
|
||||
|
||||
mkNum : AdN -> Num -> Num -- 3. almost ten
|
||||
mkNum : AdN -> Card -> Num -- 4. almost ten
|
||||
} ;
|
||||
|
||||
-- Dummy numbers are sometimes to select the grammatical number of a determiner.
|
||||
@@ -1136,7 +1137,7 @@ incomplete resource Constructors = open Grammar in {
|
||||
= \d -> NumCard (NumDigits d) ;
|
||||
mkNum : Digit -> Num
|
||||
= \d -> NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 d)))))) ;
|
||||
|
||||
mkNum : Card -> Num = NumCard ;
|
||||
mkNum : AdN -> Card -> Num = \a,c -> NumCard (AdNum a c)
|
||||
} ;
|
||||
|
||||
@@ -1639,6 +1640,10 @@ incomplete resource Constructors = open Grammar in {
|
||||
those_NP : NP = DetNP (DetQuant that_Quant plNum) ;
|
||||
these_NP : NP = DetNP (DetQuant this_Quant plNum) ;
|
||||
|
||||
ListAdv : Type = Grammar.ListAdv ;
|
||||
ListAP : Type = Grammar.ListAP ;
|
||||
ListNP : Type = Grammar.ListNP ;
|
||||
ListS : Type = Grammar.ListS ;
|
||||
|
||||
{-
|
||||
-- The definite and indefinite articles are commonly used determiners.
|
||||
|
||||
Reference in New Issue
Block a user