simplified 1.5 by removing mathematical/

This commit is contained in:
aarne
2008-10-06 12:49:13 +00:00
parent 394050d9f7
commit e765b97fc4
29 changed files with 308 additions and 51 deletions

View File

@@ -1510,7 +1510,8 @@ incomplete resource Constructors = open Grammar in {
= \p,i -> TExclMark (PhrUtt NoPConj (UttImpSg p i) NoVoc) TEmpty;
mkText : Phr -> Text -> Text -- John walks. ...
= TFullStop ;
mkText : Text -> Text -> Text = \t,u -> {s = t.s ++ u.s ; lock_Text = <>} ;
mkText : Text -> Text -> Text
= \t,u -> {s = t.s ++ u.s ; lock_Text = <>} ;
} ;
mkVP = overload {

View File

@@ -1,12 +1,11 @@
--1 Symbolic: Noun Phrases with mathematical symbols
incomplete resource Symbolic = open
Symbol, Syntax, PredefCnc in {
incomplete resource Symbolic = open Symbol, Grammar in {
oper
symb : overload {
symb : Str -> NP ; -- x
symb : Int -> NP ; -- 23
symb : Integer -> NP ; -- 23
symb : Float -> NP ; -- 0.99
symb : N -> Digits -> NP ; -- level 4
symb : N -> Card -> NP ; -- level four
@@ -14,49 +13,44 @@ incomplete resource Symbolic = open
symb : Det -> N -> Card -> NP ; -- the number four
symb : Det -> CN -> Card -> NP ; -- the even number four
symb : Det -> N -> Str -> Str -> NP ; -- the levels i and j
symb : Det -> CN -> [Symb] -> NP ; -- the basic levels i, j, and k
symb : Symb -> S ; -- A
symb : Symb -> Card ; -- n
symb : Symb -> Ord -- n'th
symb : Det -> CN -> [Symb] -> NP -- the basic levels i, j, and k
} ;
mkSymb : Str -> Symb ;
mkInt : Str -> PredefCnc.Int ;
mkFloat : Str -> PredefCnc.Float ;
mkSymb : Str -> Symb ;
mkInteger : Predef.Int -> Integer ;
mkFloating : Predef.Float -> Floating ;
--.
symb = overload {
symb : Str -> NP
= \s -> mkNP (SymbPN (mkSymb s)) ;
symb : Int -> NP
= \i -> mkNP (IntPN i) ;
symb : Float -> NP
= \i -> mkNP (FloatPN i) ;
= \s -> UsePN (SymbPN (mkSymb s)) ;
symb : Integer -> NP
= \i -> UsePN (IntPN i) ;
symb : Floating -> NP
= \i -> UsePN (FloatPN i) ;
symb : N -> Digits -> NP
= \c,i -> CNNumNP (mkCN c) (mkCard i) ;
= \c,i -> CNNumNP (UseN c) (NumDigits i) ;
symb : N -> Card -> NP
= \c,n -> CNNumNP (mkCN c) n ;
= \c,n -> CNNumNP (UseN c) n ;
symb : CN -> Card -> NP
= \c,n -> CNNumNP c n ;
symb : Det -> N -> Card -> NP
= \d,n,x -> mkNP d (mkCN (mkCN n) (mkNP (NumPN x))) ;
= \d,n,x -> DetCN d (ApposCN (UseN n) (UsePN (NumPN x))) ;
symb : Det -> CN -> Card -> NP
= \d,n,x -> mkNP d (mkCN n (mkNP (NumPN x))) ;
= \d,n,x -> DetCN d (ApposCN n (UsePN (NumPN x))) ;
symb : Det -> N -> Str -> Str -> NP
= \c,n,x,y -> CNSymbNP c (mkCN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
= \c,n,x,y -> CNSymbNP c (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
symb : Det -> CN -> [Symb] -> NP
= CNSymbNP ;
symb : Symb -> S = SymbS ;
symb : Symb -> Card = SymbNum ;
symb : Symb -> Ord = SymbOrd
= CNSymbNP
} ;
mkSymb : Str -> Symb = \s -> {s = s ; lock_Symb = <>} ;
mkInt i = {s = i ; lock_Int = <>} ;
mkFloat f = {s = f ; lock_Float = <>} ;
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 : {}} ;
}

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
resource SymbolicCat = Symbolic with
(Symbol = SymbolCat),
(Syntax = SyntaxCat) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicDan = Symbolic with
(Symbol = SymbolDan),
(Grammar = GrammarDan) ;

View File

@@ -1,5 +1,5 @@
--# -path=.:present:prelude
--# -path=.:present:mathematical:prelude
resource SymbolicEng = Symbolic with
(Symbol = SymbolEng),
(Syntax = SyntaxEng) ;
(Grammar = GrammarEng) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicFin = Symbolic with
(Symbol = SymbolFin),
(Grammar = GrammarFin) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicFre = Symbolic with
(Symbol = SymbolFre),
(Grammar = GrammarFre) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicGer = Symbolic with
(Symbol = SymbolGer),
(Grammar = GrammarGer) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicIta = Symbolic with
(Symbol = SymbolIta),
(Grammar = GrammarIta) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicNor = Symbolic with
(Symbol = SymbolNor),
(Grammar = GrammarNor) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicSpa = Symbolic with
(Symbol = SymbolSpa),
(Grammar = GrammarSpa) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:present:mathematical:prelude
resource SymbolicSwe = Symbolic with
(Symbol = SymbolSwe),
(Grammar = GrammarSwe) ;