mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 03:09:33 -06:00
restored the summer school and Resource-HOWTO documents
This commit is contained in:
16
examples/jem-math/LexMath.gf
Normal file
16
examples/jem-math/LexMath.gf
Normal file
@@ -0,0 +1,16 @@
|
||||
interface LexMath = open Syntax in {
|
||||
|
||||
oper
|
||||
zero_PN : PN ;
|
||||
successor_N2 : N2 ;
|
||||
sum_N2 : N2 ;
|
||||
product_N2 : N2 ;
|
||||
even_A : A ;
|
||||
odd_A : A ;
|
||||
prime_A : A ;
|
||||
equal_A2 : A2 ;
|
||||
small_A : A ;
|
||||
great_A : A ;
|
||||
divisible_A2 : A2 ;
|
||||
number_N : N ;
|
||||
}
|
||||
18
examples/jem-math/LexMathFre.gf
Normal file
18
examples/jem-math/LexMathFre.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
instance LexMathFre of LexMath =
|
||||
open SyntaxFre, ParadigmsFre, (L = LexiconFre) in {
|
||||
|
||||
oper
|
||||
zero_PN = mkPN "zéro" ;
|
||||
successor_N2 = mkN2 (mkN "successeur") genitive ;
|
||||
sum_N2 = mkN2 (mkN "somme") genitive ;
|
||||
product_N2 = mkN2 (mkN "produit") genitive ;
|
||||
even_A = mkA "pair" ;
|
||||
odd_A = mkA "impair" ;
|
||||
prime_A = mkA "premier" ;
|
||||
equal_A2 = mkA2 (mkA "égal") dative ;
|
||||
small_A = L.small_A ;
|
||||
great_A = L.big_A ;
|
||||
divisible_A2 = mkA2 (mkA "divisible") (mkPrep "par") ;
|
||||
number_N = mkN "entier" ;
|
||||
|
||||
}
|
||||
18
examples/jem-math/LexMathSwe.gf
Normal file
18
examples/jem-math/LexMathSwe.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
instance LexMathSwe of LexMath =
|
||||
open SyntaxSwe, ParadigmsSwe, (L = LexiconSwe) in {
|
||||
|
||||
oper
|
||||
zero_PN = mkPN "noll" neutrum ;
|
||||
successor_N2 = mkN2 (mkN "efterföljare" "efterföljare") (mkPrep "till") ;
|
||||
sum_N2 = mkN2 (mkN "summa") (mkPrep "av") ;
|
||||
product_N2 = mkN2 (mkN "produkt" "produkter") (mkPrep "av") ;
|
||||
even_A = mkA "jämn" ;
|
||||
odd_A = mkA "udda" "udda" ;
|
||||
prime_A = mkA "prim" ;
|
||||
equal_A2 = mkA2 (mkA "lika" "lika") (mkPrep "med") ;
|
||||
small_A = L.small_A ;
|
||||
great_A = L.big_A ;
|
||||
divisible_A2 = mkA2 (mkA "delbar") (mkPrep "med") ;
|
||||
number_N = mkN "tal" "tal" ;
|
||||
|
||||
}
|
||||
8
examples/jem-math/MathFre.gf
Normal file
8
examples/jem-math/MathFre.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete MathFre of Math = MathI with
|
||||
(Syntax = SyntaxFre),
|
||||
(Mathematical = MathematicalFre),
|
||||
(LexMath = LexMathFre) ;
|
||||
|
||||
|
||||
51
examples/jem-math/MathI.gf
Normal file
51
examples/jem-math/MathI.gf
Normal file
@@ -0,0 +1,51 @@
|
||||
incomplete concrete MathI of Math = open
|
||||
Syntax,
|
||||
Mathematical,
|
||||
LexMath,
|
||||
Prelude in {
|
||||
|
||||
lincat
|
||||
Prop = S ;
|
||||
Exp = NP ;
|
||||
|
||||
lin
|
||||
And = mkS and_Conj ;
|
||||
Or = mkS or_Conj ;
|
||||
If a = mkS (mkAdv if_Subj a) ;
|
||||
|
||||
Zero = mkNP zero_PN ;
|
||||
Successor = funct1 successor_N2 ;
|
||||
|
||||
Sum = funct2 sum_N2 ;
|
||||
Product = funct2 product_N2 ;
|
||||
|
||||
Even = pred1 even_A ;
|
||||
Odd = pred1 odd_A ;
|
||||
Prime = pred1 prime_A ;
|
||||
|
||||
Equal = pred2 equal_A2 ;
|
||||
Less = predC small_A ;
|
||||
Greater = predC great_A ;
|
||||
Divisible = pred2 divisible_A2 ;
|
||||
|
||||
oper
|
||||
funct1 : N2 -> NP -> NP = \f,x -> mkNP the_Art (mkCN f x) ;
|
||||
funct2 : N2 -> NP -> NP -> NP = \f,x,y -> mkNP the_Art (mkCN f (mkNP and_Conj x y)) ;
|
||||
|
||||
pred1 : A -> NP -> S = \f,x -> mkS (mkCl x f) ;
|
||||
pred2 : A2 -> NP -> NP -> S = \f,x,y -> mkS (mkCl x f y) ;
|
||||
predC : A -> NP -> NP -> S = \f,x,y -> mkS (mkCl x f y) ;
|
||||
|
||||
lincat
|
||||
Var = Symb ;
|
||||
lin
|
||||
X = MkSymb (ss "x") ;
|
||||
Y = MkSymb (ss "y") ;
|
||||
|
||||
EVar x = mkNP (SymbPN x) ;
|
||||
EInt i = mkNP (IntPN i) ;
|
||||
|
||||
ANumberVar x = mkNP a_Art (mkCN (mkCN number_N) (mkNP (SymbPN x))) ;
|
||||
TheNumberVar x = mkNP the_Art (mkCN (mkCN number_N) (mkNP (SymbPN x))) ;
|
||||
|
||||
}
|
||||
8
examples/jem-math/MathSwe.gf
Normal file
8
examples/jem-math/MathSwe.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete MathSwe of Math = MathI with
|
||||
(Syntax = SyntaxSwe),
|
||||
(Mathematical = MathematicalSwe),
|
||||
(LexMath = LexMathSwe) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user