1
0
forked from GitHub/gf-core

in tutorial/smart remove the hack that forced the proof object to be resolved

This commit is contained in:
krasimir
2010-10-18 12:28:39 +00:00
parent 775e59dabe
commit e36cc73b0f
3 changed files with 32 additions and 55 deletions

View File

@@ -18,16 +18,16 @@ lincat
Action = {s : VForm => Str ; part : Str} ;
Device = {s : Str ; n : Number} ;
Location = SS ;
Switchable = SS ;
Dimmable = SS ;
Statelike = SS ;
Switchable = {} ;
Dimmable = {} ;
Statelike = {} ;
lin
UCommand c = c ;
UQuestion q = q ;
CAction _ act dev = ss (act.s ! VImp ++ bothWays act.part dev.s) ;
QAction _ act st dev = ss (be dev.n ++ dev.s ++ act.s ! VPart ++ act.part ++ st.s) ;
QAction _ act _ dev = ss (be dev.n ++ dev.s ++ act.s ! VPart ++ act.part) ;
DKindOne k = {
s = "the" ++ k.s ! Sg ;
@@ -45,10 +45,10 @@ lin
light = mkNoun "light" ;
fan = mkNoun "fan" ;
switchOn _ proof = mkVerb proof.s "switch" "switched" "on" ;
switchOff _ proof = mkVerb proof.s "switch" "switched" "off" ;
switchOn _ _ = mkVerb "switch" "switched" "on" ;
switchOff _ _ = mkVerb "switch" "switched" "off" ;
dim _ proof = mkVerb proof.s "dim" "dimmed" [] ;
dim _ _ = mkVerb "dim" "dimmed" [] ;
kitchen = ss "kitchen" ;
livingRoom = ss ["living room"] ;
@@ -61,10 +61,10 @@ oper
}
} ;
mkVerb : (_,_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \proof,go,gone,away -> {
mkVerb : (_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \go,gone,away -> {
s = table {
VImp => proof++go ;
VPart => proof++gone
VImp => go ;
VPart => gone
} ;
part = away
} ;
@@ -74,14 +74,5 @@ oper
Pl => "are"
} ;
hidden : SS = ss [] ;
lin
switchable_light = hidden ;
switchable_fan = hidden ;
dimmable_light = hidden ;
statelike_switchOn _ _ = hidden ;
statelike_switchOff _ _ = hidden ;
}

View File

@@ -19,17 +19,17 @@ lincat
Action = {s : VForm => Str} ;
Device = {s : Str ; g : Gender ; n : Number} ;
Location = {s : Number => Str ; g : Gender} ;
Switchable = SS ;
Dimmable = SS ;
Statelike = SS ;
Switchable = {} ;
Dimmable = {} ;
Statelike = {} ;
lin
UCommand c = c ;
UQuestion q = q ;
CAction _ act dev = ss (act.s ! VInf ++ dev.s) ;
QAction _ act st dev =
ss (dev.s ++ est dev.g dev.n ++ act.s ! VPart dev.g dev.n ++ st.s) ;
QAction _ act _ dev =
ss (dev.s ++ est dev.g dev.n ++ act.s ! VPart dev.g dev.n) ;
DKindOne k = {
s = defArt k.g ++ k.s ! Sg ;
@@ -50,10 +50,10 @@ lin
light = mkNoun "lampe" Fem ;
fan = mkNoun "ventilateur" Masc ;
switchOn _ proof = mkVerb proof.s "allumer" "allumé" ;
switchOff _ proof = mkVerb proof.s "éteindre" "éteint" ;
switchOn _ _ = mkVerb "allumer" "allumé" ;
switchOff _ _ = mkVerb "éteindre" "éteint" ;
dim _ proof = mkVerb proof.s "baisser" "baissé" ;
dim _ _ = mkVerb "baisser" "baissé" ;
kitchen = mkNoun "cuisine" Fem ;
livingRoom = mkNoun "salon" Masc ;
@@ -67,13 +67,13 @@ oper
g = g
} ;
mkVerb : (_,_,_ : Str) -> {s : VForm => Str} = \proof,venir,venu -> {
mkVerb : (_,_ : Str) -> {s : VForm => Str} = \venir,venu -> {
s = table {
VInf => proof++venir ;
VPart Masc Sg => proof++venu ;
VPart Masc Pl => proof++venu + "s" ;
VPart Fem Sg => proof++venu + "e" ;
VPart Fem Pl => proof++venu + "es"
VInf => venir ;
VPart Masc Sg => venu ;
VPart Masc Pl => venu + "s" ;
VPart Fem Sg => venu + "e" ;
VPart Fem Pl => venu + "es"
}
} ;
@@ -86,13 +86,5 @@ oper
defArt : Gender -> Str = \g -> case g of {Masc => "le" ; Fem => "la"} ;
lin
switchable_light = ss [] ;
switchable_fan = ss [] ;
dimmable_light = ss [] ;
statelike_switchOn _ _ = ss [] ;
statelike_switchOff _ _ = ss [] ;
}

View File

@@ -14,18 +14,21 @@ lincat
Action = V2 ;
Device = NP ;
Location = N ;
Switchable = {} ;
Dimmable = {} ;
Statelike = {} ;
lin
UCommand c = mkUtt politeImpForm c ;
UQuestion q = mkUtt q ;
CAction _ act dev = mkImp act dev ;
QAction _ act st dev =
mkQS anteriorAnt (mkQCl (mkCl dev (passiveVP act))) ; ---- show empty proof
QAction _ act _ dev =
mkQS anteriorAnt (mkQCl (mkCl dev (passiveVP act))) ;
DKindOne k = mkNP defSgDet k ;
DKindMany k = mkNP defPlDet k ;
DLoc _ dev loc = mkNP dev (mkAdv in_Prep (mkNP defSgDet loc)) ;
DKindOne k = mkNP the_Det k ;
DKindMany k = mkNP thePl_Det k ;
DLoc _ dev loc = mkNP dev (mkAdv in_Prep (mkNP the_Det loc)) ;
light = light_N ;
fan = fan_N ;
@@ -37,14 +40,5 @@ lin
kitchen = kitchen_N ;
livingRoom = livingRoom_N ;
lin
switchable_light = ss [] ;
switchable_fan = ss [] ;
dimmable_light = ss [] ;
statelike_switchOn _ _ = ss [] ;
statelike_switchOff _ _ = ss [] ;
}