forked from GitHub/gf-core
next-lib renamed to lib, lib to old-lib
This commit is contained in:
187
lib/src/api/Combinators.gf
Normal file
187
lib/src/api/Combinators.gf
Normal file
@@ -0,0 +1,187 @@
|
||||
--1 Combinators: a High-Level Syntax API
|
||||
|
||||
-- This module defines some "grammatical functions" that give shortcuts to
|
||||
-- typical constructions. [``Constructors`` Constructors.html] and the
|
||||
-- language-specific ``Paradigms`` modules are usually needed
|
||||
-- to construct arguments of these functions.
|
||||
|
||||
incomplete resource Combinators = open Cat, Structural, Constructors in {
|
||||
|
||||
oper
|
||||
|
||||
--2 Predication
|
||||
|
||||
pred : overload {
|
||||
pred : V -> NP -> Cl ; -- x converges
|
||||
pred : V2 -> NP -> NP -> Cl ; -- x intersects y
|
||||
pred : V3 -> NP -> NP -> NP -> Cl ; -- x intersects y at z
|
||||
pred : V -> NP -> NP -> Cl ; -- x and y intersect
|
||||
pred : A -> NP -> Cl ; -- x is even
|
||||
pred : A2 -> NP -> NP -> Cl ; -- x is divisible by y
|
||||
pred : A -> NP -> NP -> Cl ; -- x and y are equal
|
||||
pred : N -> NP -> Cl ; -- x is a maximum
|
||||
pred : CN -> NP -> Cl ; -- x is a local maximum
|
||||
pred : NP -> NP -> Cl ; -- x is the neutral element
|
||||
pred : N -> NP -> NP -> Cl ; -- x and y are inverses
|
||||
pred : Adv -> NP -> Cl ; -- x is in scope
|
||||
pred : Prep -> NP -> NP -> Cl -- x is outside y
|
||||
} ;
|
||||
|
||||
--2 Function application
|
||||
|
||||
app : overload {
|
||||
app : N -> NP ;
|
||||
app : N2 -> NP -> NP ;
|
||||
app : N3 -> NP -> NP -> NP ;
|
||||
app : N2 -> NP -> NP -> NP ;
|
||||
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
|
||||
|
||||
coord : overload {
|
||||
coord : Conj -> Adv -> Adv -> Adv ;
|
||||
coord : Conj -> AP -> AP -> AP ;
|
||||
coord : Conj -> NP -> NP -> NP ;
|
||||
coord : Conj -> S -> S -> S ;
|
||||
coord : Conj -> ListAdv -> Adv ;
|
||||
coord : Conj -> ListAP -> AP ;
|
||||
coord : Conj -> ListNP -> NP ;
|
||||
coord : Conj -> ListS -> S ;
|
||||
|
||||
} ;
|
||||
|
||||
--2 Modification
|
||||
|
||||
mod : overload {
|
||||
mod : A -> N -> CN ;
|
||||
mod : AP -> CN -> CN ;
|
||||
mod : AdA -> A -> AP ;
|
||||
mod : Det -> N -> NP ;
|
||||
mod : Det -> CN -> NP ;
|
||||
mod : Quant -> N -> NP ;
|
||||
mod : Quant -> CN -> NP ;
|
||||
mod : Predet -> N -> NP ;
|
||||
mod : Numeral -> N -> NP
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
--2 Negation
|
||||
|
||||
neg : overload {
|
||||
neg : Imp -> Utt ;
|
||||
neg : Cl -> S ;
|
||||
neg : QCl -> QS ;
|
||||
neg : RCl -> RS
|
||||
};
|
||||
|
||||
--.
|
||||
|
||||
pred = overload {
|
||||
pred : V -> NP -> Cl
|
||||
= \v,np -> mkCl np v ;
|
||||
pred : V2 -> NP -> NP -> Cl
|
||||
= \v,np,ob -> mkCl np v ob ;
|
||||
pred : V3 -> NP -> NP -> NP -> Cl
|
||||
= \v,np,ob,ob2 -> mkCl np v ob ob2 ;
|
||||
pred : V -> NP -> NP -> Cl --# notminimal
|
||||
= \v,x,y -> mkCl (mkNP and_Conj x y) v ; --# notminimal
|
||||
pred : A -> NP -> Cl
|
||||
= \a,np -> mkCl np a ;
|
||||
pred : A2 -> NP -> NP -> Cl --# notminimal
|
||||
= \a,x,y -> mkCl x a y ; --# notminimal
|
||||
pred : A -> NP -> NP -> Cl --# notminimal
|
||||
= \a,x,y -> mkCl (mkNP and_Conj x y) a ; --# notminimal
|
||||
pred : N -> NP -> Cl
|
||||
= \n,x -> mkCl x (mkNP a_Art n) ;
|
||||
pred : CN -> NP -> Cl
|
||||
= \n,x -> mkCl x (mkNP a_Art n) ;
|
||||
pred : NP -> NP -> Cl
|
||||
= \n,x -> mkCl x n ;
|
||||
pred : N2 -> NP -> NP -> Cl --# notminimal
|
||||
= \n,x,y -> mkCl x (mkNP a_Art (mkCN n y)) ; --# notminimal
|
||||
pred : N -> NP -> NP -> Cl --# notminimal
|
||||
= \n,x,y -> mkCl (mkNP and_Conj x y) (mkNP a_Art plNum n) ; --# notminimal
|
||||
pred : Adv -> NP -> Cl
|
||||
= \a,x -> mkCl x a ;
|
||||
pred : Prep -> NP -> NP -> Cl
|
||||
= \p,x,y -> mkCl x (mkAdv p y) ;
|
||||
} ;
|
||||
|
||||
app = overload {
|
||||
app : N -> NP
|
||||
= \n -> mkNP the_Art n ;
|
||||
app : N2 -> NP -> NP --# notminimal
|
||||
= \n,x -> mkNP the_Art (mkCN n x) ; --# notminimal
|
||||
app : N3 -> NP -> NP -> NP --# notminimal
|
||||
= \n,x,y -> mkNP the_Art (mkCN n x y) ; --# notminimal
|
||||
app : N2 -> NP -> NP -> NP --# notminimal
|
||||
= \n,x,y -> mkNP the_Art (mkCN n (mkNP and_Conj x y)) ; --# notminimal
|
||||
app : N2 -> N -> CN --# notminimal
|
||||
= \f,n -> mkCN f (mkNP a_Art plNum n) ; --# notminimal
|
||||
app : N2 -> NP -> CN --# notminimal
|
||||
= mkCN ; --# notminimal
|
||||
app : N3 -> NP -> NP -> CN --# notminimal
|
||||
= mkCN ; --# notminimal
|
||||
app : N2 -> NP -> NP -> CN --# notminimal
|
||||
= \n,x,y -> mkCN n (mkNP and_Conj x y) ; --# notminimal
|
||||
} ;
|
||||
|
||||
coord = overload { --# notminimal
|
||||
coord : Conj -> Adv -> Adv -> Adv --# notminimal
|
||||
= mkAdv ; --# notminimal
|
||||
coord : Conj -> AP -> AP -> AP --# notminimal
|
||||
= mkAP ; --# notminimal
|
||||
coord : Conj -> NP -> NP -> NP --# notminimal
|
||||
= mkNP ; --# notminimal
|
||||
coord : Conj -> S -> S -> S --# notminimal
|
||||
= mkS ; --# notminimal
|
||||
coord : Conj -> ListAdv -> Adv --# notminimal
|
||||
= mkAdv ; --# notminimal
|
||||
coord : Conj -> ListAP -> AP --# notminimal
|
||||
= mkAP ; --# notminimal
|
||||
coord : Conj -> ListNP -> NP --# notminimal
|
||||
= mkNP ; --# notminimal
|
||||
coord : Conj -> ListS -> S --# notminimal
|
||||
= mkS ; --# notminimal
|
||||
} ; --# notminimal
|
||||
|
||||
mod = overload {
|
||||
mod : A -> N -> CN
|
||||
= mkCN ;
|
||||
mod : AP -> CN -> CN
|
||||
= mkCN ;
|
||||
mod : AdA -> A -> AP
|
||||
= mkAP ;
|
||||
mod : Det -> N -> NP
|
||||
= mkNP ;
|
||||
mod : Det -> CN -> NP
|
||||
= mkNP ;
|
||||
mod : Quant -> N -> NP
|
||||
= mkNP ;
|
||||
mod : Quant -> CN -> NP
|
||||
= mkNP ;
|
||||
mod : Predet -> N -> NP
|
||||
= \p,n -> mkNP p (mkNP a_Art n) ;
|
||||
mod : Numeral -> N -> NP
|
||||
= mkNP ;
|
||||
} ;
|
||||
|
||||
neg = overload {
|
||||
neg : Imp -> Utt
|
||||
= mkUtt negativePol ;
|
||||
neg : Cl -> S
|
||||
= mkS negativePol ;
|
||||
neg : QCl -> QS
|
||||
= mkQS negativePol ;
|
||||
neg : RCl -> RS --# notminimal
|
||||
= mkRS negativePol ; --# notminimal
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
6
lib/src/api/CombinatorsAra.gf
Normal file
6
lib/src/api/CombinatorsAra.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsAra = Combinators with
|
||||
(Cat = CatAra),
|
||||
(Structural = StructuralAra),
|
||||
(Constructors = ConstructorsAra) ;
|
||||
6
lib/src/api/CombinatorsBul.gf
Normal file
6
lib/src/api/CombinatorsBul.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsBul = Combinators with
|
||||
(Cat = CatBul),
|
||||
(Structural = StructuralBul),
|
||||
(Constructors = ConstructorsBul) ;
|
||||
6
lib/src/api/CombinatorsCat.gf
Normal file
6
lib/src/api/CombinatorsCat.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses
|
||||
|
||||
resource CombinatorsCat = Combinators with
|
||||
(Cat = CatCat),
|
||||
(Structural = StructuralCat),
|
||||
(Constructors = ConstructorsCat) ;
|
||||
6
lib/src/api/CombinatorsDan.gf
Normal file
6
lib/src/api/CombinatorsDan.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsDan = Combinators with
|
||||
(Cat = CatDan),
|
||||
(Structural = StructuralDan),
|
||||
(Constructors = ConstructorsDan) ;
|
||||
6
lib/src/api/CombinatorsEng.gf
Normal file
6
lib/src/api/CombinatorsEng.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsEng = Combinators with
|
||||
(Cat = CatEng),
|
||||
(Structural = StructuralEng),
|
||||
(Constructors = ConstructorsEng) ;
|
||||
6
lib/src/api/CombinatorsFin.gf
Normal file
6
lib/src/api/CombinatorsFin.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsFin = Combinators with
|
||||
(Cat = CatFin),
|
||||
(Structural = StructuralFin),
|
||||
(Constructors = ConstructorsFin) ;
|
||||
6
lib/src/api/CombinatorsFre.gf
Normal file
6
lib/src/api/CombinatorsFre.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsFre = Combinators with
|
||||
(Cat = CatFre),
|
||||
(Structural = StructuralFre),
|
||||
(Constructors = ConstructorsFre) ;
|
||||
6
lib/src/api/CombinatorsGer.gf
Normal file
6
lib/src/api/CombinatorsGer.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsGer = Combinators with
|
||||
(Cat = CatGer),
|
||||
(Structural = StructuralGer),
|
||||
(Constructors = ConstructorsGer) ;
|
||||
6
lib/src/api/CombinatorsHin.gf
Normal file
6
lib/src/api/CombinatorsHin.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsHin = Combinators with
|
||||
(Cat = CatHin),
|
||||
(Structural = StructuralHin),
|
||||
(Constructors = ConstructorsHin) ;
|
||||
6
lib/src/api/CombinatorsIna.gf
Normal file
6
lib/src/api/CombinatorsIna.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsIna = Combinators with
|
||||
(Cat = CatIna),
|
||||
(Structural = StructuralIna),
|
||||
(Constructors = ConstructorsIna) ;
|
||||
6
lib/src/api/CombinatorsIta.gf
Normal file
6
lib/src/api/CombinatorsIta.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsIta = Combinators with
|
||||
(Cat = CatIta),
|
||||
(Structural = StructuralIta),
|
||||
(Constructors = ConstructorsIta) ;
|
||||
6
lib/src/api/CombinatorsNor.gf
Normal file
6
lib/src/api/CombinatorsNor.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsNor = Combinators with
|
||||
(Cat = CatNor),
|
||||
(Structural = StructuralNor),
|
||||
(Constructors = ConstructorsNor) ;
|
||||
6
lib/src/api/CombinatorsRus.gf
Normal file
6
lib/src/api/CombinatorsRus.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsRus = Combinators with
|
||||
(Cat = CatRus),
|
||||
(Structural = StructuralRus),
|
||||
(Constructors = ConstructorsRus) ;
|
||||
6
lib/src/api/CombinatorsSpa.gf
Normal file
6
lib/src/api/CombinatorsSpa.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses
|
||||
|
||||
resource CombinatorsSpa = Combinators with
|
||||
(Cat = CatSpa),
|
||||
(Structural = StructuralSpa),
|
||||
(Constructors = ConstructorsSpa) ;
|
||||
6
lib/src/api/CombinatorsSwe.gf
Normal file
6
lib/src/api/CombinatorsSwe.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsSwe = Combinators with
|
||||
(Cat = CatSwe),
|
||||
(Structural = StructuralSwe),
|
||||
(Constructors = ConstructorsSwe) ;
|
||||
6
lib/src/api/CombinatorsTha.gf
Normal file
6
lib/src/api/CombinatorsTha.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsTha = Combinators with
|
||||
(Cat = CatTha),
|
||||
(Structural = StructuralTha),
|
||||
(Constructors = ConstructorsTha) ;
|
||||
1745
lib/src/api/Constructors.gf
Normal file
1745
lib/src/api/Constructors.gf
Normal file
File diff suppressed because it is too large
Load Diff
3
lib/src/api/ConstructorsAra.gf
Normal file
3
lib/src/api/ConstructorsAra.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsAra = Constructors with (Grammar = GrammarAra) ;
|
||||
3
lib/src/api/ConstructorsBul.gf
Normal file
3
lib/src/api/ConstructorsBul.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsBul = Constructors with (Grammar = GrammarBul) ;
|
||||
3
lib/src/api/ConstructorsCat.gf
Normal file
3
lib/src/api/ConstructorsCat.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses
|
||||
|
||||
resource ConstructorsCat = Constructors with (Grammar = GrammarCat) ;
|
||||
3
lib/src/api/ConstructorsDan.gf
Normal file
3
lib/src/api/ConstructorsDan.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsDan = Constructors with (Grammar = GrammarDan) ;
|
||||
3
lib/src/api/ConstructorsEng.gf
Normal file
3
lib/src/api/ConstructorsEng.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsEng = Constructors with (Grammar = GrammarEng) ;
|
||||
3
lib/src/api/ConstructorsFin.gf
Normal file
3
lib/src/api/ConstructorsFin.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsFin = Constructors with (Grammar = GrammarFin) ;
|
||||
3
lib/src/api/ConstructorsFre.gf
Normal file
3
lib/src/api/ConstructorsFre.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsFre = Constructors with (Grammar = GrammarFre) ;
|
||||
3
lib/src/api/ConstructorsGer.gf
Normal file
3
lib/src/api/ConstructorsGer.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsGer = Constructors with (Grammar = GrammarGer) ;
|
||||
3
lib/src/api/ConstructorsIta.gf
Normal file
3
lib/src/api/ConstructorsIta.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsIta = Constructors with (Grammar = GrammarIta) ;
|
||||
3
lib/src/api/ConstructorsNor.gf
Normal file
3
lib/src/api/ConstructorsNor.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsNor = Constructors with (Grammar = GrammarNor) ;
|
||||
3
lib/src/api/ConstructorsRus.gf
Normal file
3
lib/src/api/ConstructorsRus.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsRus = Constructors with (Grammar = GrammarRus) ;
|
||||
3
lib/src/api/ConstructorsSpa.gf
Normal file
3
lib/src/api/ConstructorsSpa.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsSpa = Constructors with (Grammar = GrammarSpa) ;
|
||||
3
lib/src/api/ConstructorsSwe.gf
Normal file
3
lib/src/api/ConstructorsSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsSwe = Constructors with (Grammar = GrammarSwe) ;
|
||||
86
lib/src/api/Symbolic.gf
Normal file
86
lib/src/api/Symbolic.gf
Normal file
@@ -0,0 +1,86 @@
|
||||
--1 Symbolic: Noun Phrases with mathematical symbols
|
||||
|
||||
incomplete resource Symbolic = open Symbol, Grammar, PredefCnc in {
|
||||
|
||||
oper
|
||||
symb : overload {
|
||||
symb : Str -> NP ; -- x
|
||||
symb : Int -> NP ; -- 23
|
||||
symb : Float -> NP ; -- 0.99
|
||||
symb : N -> Digits -> NP ; -- level 4
|
||||
symb : N -> Card -> NP ; -- level at least four
|
||||
symb : CN -> Card -> NP ; -- advanced level at least four
|
||||
symb : Det -> N -> Card -> NP ; -- the number at least four
|
||||
symb : Det -> CN -> Card -> NP ; -- the even number at least four
|
||||
symb : N -> Numeral -> NP ; -- level four
|
||||
symb : CN -> Numeral -> NP ; -- advanced level four
|
||||
symb : Det -> N -> Numeral -> NP ; -- the largest number four
|
||||
symb : Det -> CN -> Numeral -> NP ; -- the largest even number four
|
||||
symb : Det -> N -> Str -> Str -> NP ; -- the largest levels i and j
|
||||
symb : Det -> CN -> [Symb] -> NP ; -- the largest basic levels i, j, and k
|
||||
symb : Quant -> N -> Numeral -> NP ; -- the number four
|
||||
symb : Quant -> CN -> Numeral -> NP ; -- the even number four
|
||||
symb : Quant -> N -> Str -> Str -> NP ; -- the levels i and j
|
||||
symb : Quant -> CN -> [Symb] -> NP ; -- the basic levels i, j, and k
|
||||
symb : Symb -> S ; -- A
|
||||
symb : Symb -> Card ; -- n
|
||||
symb : Symb -> Ord -- n'th
|
||||
} ;
|
||||
|
||||
mkSymb : Str -> Symb ;
|
||||
mkInteger : Predef.Int -> Integer ;
|
||||
mkFloating : Predef.Float -> Floating ;
|
||||
|
||||
--.
|
||||
|
||||
symb = overload {
|
||||
symb : Str -> NP
|
||||
= \s -> UsePN (SymbPN (mkSymb s)) ;
|
||||
symb : Int -> NP
|
||||
= \i -> UsePN (IntPN i) ;
|
||||
symb : Float -> NP
|
||||
= \i -> UsePN (FloatPN i) ;
|
||||
symb : N -> Digits -> NP
|
||||
= \c,i -> CNNumNP (UseN c) (NumDigits i) ;
|
||||
symb : N -> Card -> NP
|
||||
= \c,n -> CNNumNP (UseN c) n ;
|
||||
symb : CN -> Card -> NP
|
||||
= \c,n -> CNNumNP c n ;
|
||||
symb : Det -> N -> Card -> NP
|
||||
= \d,n,x -> DetCN d (ApposCN (UseN n) (UsePN (NumPN x))) ;
|
||||
symb : Det -> CN -> Card -> NP
|
||||
= \d,n,x -> DetCN d (ApposCN n (UsePN (NumPN x))) ;
|
||||
symb : N -> Numeral -> NP
|
||||
= \c,n -> CNNumNP (UseN c) (NumNumeral n) ;
|
||||
symb : CN -> Numeral -> NP
|
||||
= \c,n -> CNNumNP c (NumNumeral n) ;
|
||||
symb : Det -> N -> Numeral -> NP
|
||||
= \d,n,x -> DetCN d (ApposCN (UseN n) (UsePN (NumPN (NumNumeral x)))) ;
|
||||
symb : Det -> CN -> Numeral -> NP
|
||||
= \d,n,x -> DetCN d (ApposCN n (UsePN (NumPN (NumNumeral x)))) ;
|
||||
symb : Det -> N -> Str -> Str -> NP
|
||||
= \c,n,x,y -> CNSymbNP c (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
|
||||
symb : Det -> CN -> [Symb] -> NP
|
||||
= CNSymbNP ;
|
||||
symb : Quant -> N -> Numeral -> NP
|
||||
= \d,n,x -> DetCN (DetQuant d NumSg) (ApposCN (UseN n) (UsePN (NumPN (NumNumeral x)))) ;
|
||||
symb : Quant -> CN -> Numeral -> NP
|
||||
= \d,n,x -> DetCN (DetQuant d NumSg) (ApposCN n (UsePN (NumPN (NumNumeral x)))) ;
|
||||
symb : Quant -> N -> Str -> Str -> NP
|
||||
= \d,n,x,y -> CNSymbNP (DetQuant d NumSg) (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
|
||||
symb : Quant -> CN -> [Symb] -> NP
|
||||
= \d -> CNSymbNP (DetQuant d NumSg);
|
||||
symb : Symb -> S = SymbS ;
|
||||
symb : Symb -> Card = SymbNum ;
|
||||
symb : Symb -> Ord = SymbOrd
|
||||
} ;
|
||||
|
||||
mkSymb : Str -> Symb = \s -> {s = s ; lock_Symb = <>} ;
|
||||
|
||||
mkInteger i = {s = Predef.show Predef.Int i ; lock_Int = <>} ;
|
||||
mkFloating f = {s = Predef.show Predef.Float f ; lock_Float = <>} ;
|
||||
|
||||
Integer : Type = {s : Str ; lock_Int : {}} ;
|
||||
Floating : Type = {s : Str ; lock_Float : {}} ;
|
||||
|
||||
}
|
||||
5
lib/src/api/SymbolicBul.gf
Normal file
5
lib/src/api/SymbolicBul.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicBul = Symbolic with
|
||||
(Symbol = SymbolBul),
|
||||
(Grammar = GrammarBul) ;
|
||||
5
lib/src/api/SymbolicCat.gf
Normal file
5
lib/src/api/SymbolicCat.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
resource SymbolicCat = Symbolic with
|
||||
(Symbol = SymbolCat),
|
||||
(Grammar = GrammarCat) ;
|
||||
5
lib/src/api/SymbolicDan.gf
Normal file
5
lib/src/api/SymbolicDan.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicDan = Symbolic with
|
||||
(Symbol = SymbolDan),
|
||||
(Grammar = GrammarDan) ;
|
||||
5
lib/src/api/SymbolicEng.gf
Normal file
5
lib/src/api/SymbolicEng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicEng = Symbolic with
|
||||
(Symbol = SymbolEng),
|
||||
(Grammar = GrammarEng) ;
|
||||
5
lib/src/api/SymbolicFin.gf
Normal file
5
lib/src/api/SymbolicFin.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicFin = Symbolic with
|
||||
(Symbol = SymbolFin),
|
||||
(Grammar = GrammarFin) ;
|
||||
5
lib/src/api/SymbolicFre.gf
Normal file
5
lib/src/api/SymbolicFre.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicFre = Symbolic with
|
||||
(Symbol = SymbolFre),
|
||||
(Grammar = GrammarFre) ;
|
||||
5
lib/src/api/SymbolicGer.gf
Normal file
5
lib/src/api/SymbolicGer.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicGer = Symbolic with
|
||||
(Symbol = SymbolGer),
|
||||
(Grammar = GrammarGer) ;
|
||||
5
lib/src/api/SymbolicIta.gf
Normal file
5
lib/src/api/SymbolicIta.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicIta = Symbolic with
|
||||
(Symbol = SymbolIta),
|
||||
(Grammar = GrammarIta) ;
|
||||
5
lib/src/api/SymbolicNor.gf
Normal file
5
lib/src/api/SymbolicNor.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicNor = Symbolic with
|
||||
(Symbol = SymbolNor),
|
||||
(Grammar = GrammarNor) ;
|
||||
5
lib/src/api/SymbolicSpa.gf
Normal file
5
lib/src/api/SymbolicSpa.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
resource SymbolicSpa = Symbolic with
|
||||
(Symbol = SymbolSpa),
|
||||
(Grammar = GrammarSpa) ;
|
||||
5
lib/src/api/SymbolicSwe.gf
Normal file
5
lib/src/api/SymbolicSwe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicSwe = Symbolic with
|
||||
(Symbol = SymbolSwe),
|
||||
(Grammar = GrammarSwe) ;
|
||||
4
lib/src/api/Syntax.gf
Normal file
4
lib/src/api/Syntax.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
interface Syntax = Constructors, Cat, Structural, Combinators ;
|
||||
|
||||
4
lib/src/api/SyntaxAra.gf
Normal file
4
lib/src/api/SyntaxAra.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxAra of Syntax = ConstructorsAra, CatAra, StructuralAra, CombinatorsAra ;
|
||||
|
||||
4
lib/src/api/SyntaxBul.gf
Normal file
4
lib/src/api/SyntaxBul.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxBul of Syntax = ConstructorsBul, CatBul, StructuralBul, CombinatorsBul ;
|
||||
|
||||
5
lib/src/api/SyntaxCat.gf
Normal file
5
lib/src/api/SyntaxCat.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses
|
||||
|
||||
instance SyntaxCat of Syntax =
|
||||
ConstructorsCat, CatCat, StructuralCat, CombinatorsCat ;
|
||||
|
||||
4
lib/src/api/SyntaxDan.gf
Normal file
4
lib/src/api/SyntaxDan.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxDan of Syntax = ConstructorsDan, CatDan, StructuralDan, CombinatorsDan ;
|
||||
|
||||
5
lib/src/api/SyntaxEng.gf
Normal file
5
lib/src/api/SyntaxEng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxEng of Syntax =
|
||||
ConstructorsEng, CatEng, StructuralEng, CombinatorsEng ;
|
||||
|
||||
4
lib/src/api/SyntaxFin.gf
Normal file
4
lib/src/api/SyntaxFin.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxFin of Syntax = ConstructorsFin, CatFin, StructuralFin, CombinatorsFin ;
|
||||
|
||||
4
lib/src/api/SyntaxFre.gf
Normal file
4
lib/src/api/SyntaxFre.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxFre of Syntax = ConstructorsFre, CatFre, StructuralFre, CombinatorsFre ;
|
||||
|
||||
4
lib/src/api/SyntaxGer.gf
Normal file
4
lib/src/api/SyntaxGer.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxGer of Syntax = ConstructorsGer, CatGer, StructuralGer, CombinatorsGer ;
|
||||
|
||||
4
lib/src/api/SyntaxIta.gf
Normal file
4
lib/src/api/SyntaxIta.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxIta of Syntax = ConstructorsIta, CatIta, StructuralIta, CombinatorsIta ;
|
||||
|
||||
5
lib/src/api/SyntaxNor.gf
Normal file
5
lib/src/api/SyntaxNor.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxNor of Syntax = ConstructorsNor, CatNor, StructuralNor, CombinatorsNor
|
||||
;
|
||||
|
||||
4
lib/src/api/SyntaxRus.gf
Normal file
4
lib/src/api/SyntaxRus.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxRus of Syntax = ConstructorsRus, CatRus, StructuralRus, CombinatorsRus ;
|
||||
|
||||
5
lib/src/api/SyntaxSpa.gf
Normal file
5
lib/src/api/SyntaxSpa.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses
|
||||
|
||||
instance SyntaxSpa of Syntax =
|
||||
ConstructorsSpa, CatSpa, StructuralSpa, CombinatorsSpa ;
|
||||
|
||||
5
lib/src/api/SyntaxSwe.gf
Normal file
5
lib/src/api/SyntaxSwe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxSwe of Syntax =
|
||||
ConstructorsSwe, CatSwe, StructuralSwe, CombinatorsSwe ;
|
||||
|
||||
13
lib/src/api/TryBul.gf
Normal file
13
lib/src/api/TryBul.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryBul = SyntaxBul, LexiconBul, ParadigmsBul - [mkAdv] **
|
||||
open (P = ParadigmsBul) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxBul {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
13
lib/src/api/TryCat.gf
Normal file
13
lib/src/api/TryCat.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryCat = SyntaxCat, LexiconCat, ParadigmsCat - [mkAdv] **
|
||||
open (P = ParadigmsCat) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxCat {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
3
lib/src/api/TryDan.gf
Normal file
3
lib/src/api/TryDan.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryDan = SyntaxDan, LexiconDan, ParadigmsDan - [mkAdv] ;
|
||||
22
lib/src/api/TryEng.gf
Normal file
22
lib/src/api/TryEng.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryEng = SyntaxEng-[mkAdN], LexiconEng, ParadigmsEng - [mkAdv,mkAdN,mkOrd] **
|
||||
open (P = ParadigmsEng) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxEng {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxEng.mkAdN ;
|
||||
mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
mkOrd = overload SyntaxEng {
|
||||
mkOrd : Str -> Ord = P.mkOrd ;
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
3
lib/src/api/TryFin.gf
Normal file
3
lib/src/api/TryFin.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryFin = SyntaxFin, LexiconFin-[mkOrd], ParadigmsFin - [mkAdv] ;
|
||||
3
lib/src/api/TryFre.gf
Normal file
3
lib/src/api/TryFre.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryFre = SyntaxFre, LexiconFre, ParadigmsFre - [mkAdv] ;
|
||||
3
lib/src/api/TryGer.gf
Normal file
3
lib/src/api/TryGer.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryGer = SyntaxGer, LexiconGer, ParadigmsGer - [mkAdv] ;
|
||||
3
lib/src/api/TryIta.gf
Normal file
3
lib/src/api/TryIta.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryIta = SyntaxIta, LexiconIta, ParadigmsIta - [mkAdv,in_Prep] ;
|
||||
3
lib/src/api/TryNor.gf
Normal file
3
lib/src/api/TryNor.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryNor = SyntaxNor, LexiconNor, ParadigmsNor - [mkAdv] ;
|
||||
3
lib/src/api/TryRus.gf
Normal file
3
lib/src/api/TryRus.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv] ;
|
||||
3
lib/src/api/TrySpa.gf
Normal file
3
lib/src/api/TrySpa.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TrySpa = SyntaxSpa, LexiconSpa, ParadigmsSpa - [mkAdv] ;
|
||||
12
lib/src/api/TrySwe.gf
Normal file
12
lib/src/api/TrySwe.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource TrySwe = SyntaxSwe, LexiconSwe, ParadigmsSwe - [mkAdv] **
|
||||
open (P = ParadigmsSwe) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxSwe {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
}
|
||||
76
lib/src/api/minimals.txt
Normal file
76
lib/src/api/minimals.txt
Normal file
@@ -0,0 +1,76 @@
|
||||
ASimul
|
||||
AdAP
|
||||
AdjCN
|
||||
AdvVP
|
||||
CompAP
|
||||
CompAdv
|
||||
CompNP
|
||||
ComparA
|
||||
ComplSlash
|
||||
DefArt
|
||||
DetCN
|
||||
DetQuant
|
||||
Grammar
|
||||
IdetCN
|
||||
IdetQuant
|
||||
ImpVP
|
||||
IndefArt
|
||||
MassNP
|
||||
NoPConj
|
||||
NoVoc
|
||||
NumCard
|
||||
NumNumeral
|
||||
NumPl
|
||||
NumSg
|
||||
PNeg
|
||||
PPos
|
||||
PhrUtt
|
||||
PositA
|
||||
PositAdvAdj
|
||||
PredVP
|
||||
PredetNP
|
||||
PrepNP
|
||||
QuestCl
|
||||
QuestIAdv
|
||||
QuestVP
|
||||
Slash3V3
|
||||
SlashV2A
|
||||
SlashV2a
|
||||
TEmpty
|
||||
TExclMark
|
||||
TFullStop
|
||||
TPres
|
||||
TQuestMark
|
||||
TTAnt
|
||||
UseCl
|
||||
UseComp
|
||||
UseN
|
||||
UsePN
|
||||
UsePron
|
||||
UseQCl
|
||||
UseV
|
||||
UttAdv
|
||||
UttIAdv
|
||||
UttIP
|
||||
UttImpSg
|
||||
UttNP
|
||||
UttQS
|
||||
UttS
|
||||
n2
|
||||
n3
|
||||
n4
|
||||
n5
|
||||
n6
|
||||
n7
|
||||
n8
|
||||
n9
|
||||
plNum
|
||||
pot0
|
||||
pot01
|
||||
pot0as1
|
||||
pot1
|
||||
pot110
|
||||
pot1as2
|
||||
pot2
|
||||
pot2as3
|
||||
pot3
|
||||
Reference in New Issue
Block a user