summaryrefslogtreecommitdiff
path: root/doc/tutorial/resource/SyntaxEng.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-08-16 14:10:06 +0000
committeraarne <aarne@cs.chalmers.se>2007-08-16 14:10:06 +0000
commit5f0e8a16ecbf06a6dad344ce2ef0974692ffc581 (patch)
tree6611d0e8cfeb65f67530267e2f51bc58594893ad /doc/tutorial/resource/SyntaxEng.gf
parent1f342b2c25a5b3026de101028a56b3ff17e04e5b (diff)
improving mini res morpho
Diffstat (limited to 'doc/tutorial/resource/SyntaxEng.gf')
-rw-r--r--doc/tutorial/resource/SyntaxEng.gf19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/tutorial/resource/SyntaxEng.gf b/doc/tutorial/resource/SyntaxEng.gf
index 4eac0058e..f1de47e21 100644
--- a/doc/tutorial/resource/SyntaxEng.gf
+++ b/doc/tutorial/resource/SyntaxEng.gf
@@ -6,17 +6,17 @@ concrete SyntaxEng of Syntax = open Prelude, MorphoEng in {
Phr = {s : Str} ;
S = {s : Str} ;
QS = {s : Str} ;
- NP = MorphoEng.NP ;
- IP = MorphoEng.NP ;
+ NP = NounPhrase ;
+ IP = NounPhrase ;
CN = Noun ;
Det = {s : Str ; n : Number} ;
AP = {s : Str} ;
AdA = {s : Str} ;
- VP = MorphoEng.VP ;
+ VP = VerbPhrase ;
N = Noun ;
A = {s : Str} ;
V = Verb ;
- V2 = Verb ** {c : Str} ;
+ V2 = Verb2 ;
lin
PhrS = postfixSS "." ;
@@ -31,13 +31,13 @@ concrete SyntaxEng of Syntax = open Prelude, MorphoEng in {
IPPosV2 ip np v2 = {
s = let
- vp : MorphoEng.VP = {s = \\q,b,n => predVerb v2 q b n} ;
+ vp : VerbPhrase = {s = \\q,b,n => predVerb v2 q b n} ;
in
bothWays (ip.s ++ (predVP False True np vp).s) v2.c
} ;
IPNegV2 ip np v2 = {
s = let
- vp : MorphoEng.VP = {s = \\q,b,n => predVerb v2 q b n} ;
+ vp : VerbPhrase = {s = \\q,b,n => predVerb v2 q b n} ;
in
bothWays (ip.s ++ (predVP False False np vp).s) v2.c
} ;
@@ -77,7 +77,10 @@ concrete SyntaxEng of Syntax = open Prelude, MorphoEng in {
very_AdA = {s = "very"} ;
oper
- predVP : Bool -> Bool -> MorphoEng.NP -> MorphoEng.VP -> SS =
+ NounPhrase = {s : Str ; n : Number} ;
+ VerbPhrase = {s : Bool => Bool => Number => Str * Str} ; -- decl, pol
+
+ predVP : Bool -> Bool -> NounPhrase -> VerbPhrase -> SS =
\q,b,np,vp -> {
s = let vps = vp.s ! q ! b ! np.n
in case q of {
@@ -92,7 +95,7 @@ concrete SyntaxEng of Syntax = open Prelude, MorphoEng in {
} ;
do : Bool -> Number -> Str = \b,n ->
- posneg b ((regVerb "do").s ! n) ;
+ posneg b ((mkV "do").s ! n) ;
predVerb : Verb -> Bool -> Bool -> Number -> Str * Str = \verb,q,b,n ->
let