diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2011-08-23 15:05:04 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2011-08-23 15:05:04 +0000 |
| commit | 5339aa80744c3afd221256d763cf784386eed573 (patch) | |
| tree | 1b177490643c42910537200ac4702d3cf3df6bbc | |
| parent | 623c72ca1dd60c7e9a3b92bcfda873e42eb04adc (diff) | |
fix SUMO after the update in DictEng
| -rw-r--r-- | examples/SUMO/MidLevelOntologyEng.gf | 2 | ||||
| -rw-r--r-- | examples/SUMO/RGLExt/Extension.gf | 8 | ||||
| -rw-r--r-- | examples/SUMO/RGLExt/ExtensionEng.gf | 17 | ||||
| -rw-r--r-- | examples/nqueens/NatAscii.gf | 2 |
4 files changed, 10 insertions, 19 deletions
diff --git a/examples/SUMO/MidLevelOntologyEng.gf b/examples/SUMO/MidLevelOntologyEng.gf index fb1aa5dc2..8e0cc1570 100644 --- a/examples/SUMO/MidLevelOntologyEng.gf +++ b/examples/SUMO/MidLevelOntologyEng.gf @@ -1464,7 +1464,7 @@ lin quarter ob1 ob2 = mkPolSent (PredVP ob1 (AdvVP (UseComp (CompNP (DetCN (DetQuant IndefArt NumSg) (UseN quarter_N)))) (PrepNP part_Prep ob2))) ;
third ob1 ob2 = mkPolSent (PredVP ob1 (AdvVP (UseComp (CompNP (DetCN (DetQuant IndefArt NumSg) (UseN (mkN "third"))))) (PrepNP part_Prep ob2))) ;
fears ob1 ob2 = mkPolSent (PredVP ob1 (ComplSlash (SlashV2a fear_V2) (sentToNoun ob2))) ;
- hopes ob1 ob2 = mkPolSent (PredVP ob1 (ComplSlash (SlashV2a hope_V2) (sentToNoun ob2))) ;
+ hopes ob1 ob2 = mkPolSent (PredVP ob1 (ComplVS hope_VS (getSent ob2))) ;
plaintiff ob1 ob2 = mkPolSent (PredVP ob1 (AdvVP (UseComp (CompNP (DetCN (DetQuant IndefArt NumSg) (UseN plaintiff_N)))) (PrepNP part_Prep ob2))) ;
brandName ob1 ob2 = mkPolSent (PredVP ob1 (AdvVP (UseComp (CompNP (DetCN (DetQuant IndefArt NumSg) (ApposCN (UseN brand_N) (MassNP (UseN name_N)))))) (PrepNP part_Prep ob2))) ;
formerName ob1 ob2 = mkPolSent (PredVP ob1 (AdvVP (UseComp (CompNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA former_A) (UseN name_N))))) (PrepNP part_Prep ob2))) ;
diff --git a/examples/SUMO/RGLExt/Extension.gf b/examples/SUMO/RGLExt/Extension.gf index 72a4dd332..e9410526f 100644 --- a/examples/SUMO/RGLExt/Extension.gf +++ b/examples/SUMO/RGLExt/Extension.gf @@ -1,23 +1,21 @@ -- other functions needed for parsing
-abstract Extension = {
-
-
+abstract Extension = Cat ** {
cat
PolSentence;
StmtS ;
[CN]{2};
- N; N2; A; V; V2; CN; NP; Cl; Pol; Prep; Conj; -- redefined from Cat
-fun
+fun
VerbToNounV2 : V2 -> N2 ; -- discovering
VerbToNoun : V -> N ; -- walking is healthy
VerbToGerundA : V -> A ; -- singing bird
VerbToParticipeA : V -> A ; -- the required number
ConjCN : Conj -> [CN] -> CN ; -- set or class
mkPolSent : Cl -> PolSentence ;
+getSent : PolSentence -> S ;
sentToNoun : PolSentence -> NP ;
UsePolSentence : Pol -> PolSentence -> StmtS ;
diff --git a/examples/SUMO/RGLExt/ExtensionEng.gf b/examples/SUMO/RGLExt/ExtensionEng.gf index 89fd8a9e4..4c4213cfd 100644 --- a/examples/SUMO/RGLExt/ExtensionEng.gf +++ b/examples/SUMO/RGLExt/ExtensionEng.gf @@ -1,25 +1,14 @@ --# -path=.:RGLExt:alltenses:../../lib/src/english
-concrete ExtensionEng of Extension = open CatEng, MorphoEng, ResEng, ConjunctionEng, StructuralEng, Prelude, ParadigmsEng, Coordination, ParamBasic in {
+concrete ExtensionEng of Extension = CatEng ** open MorphoEng, ResEng, ConjunctionEng, StructuralEng, Prelude, ParadigmsEng, Coordination, ParamBasic in {
lincat
PolSentence = {s : SentForm => CPolarity => Str ; flag : Flag};
[CN] = {s1,s2 : Number => ResEng.Case => Str ; g : Gender} ;
StmtS = {s : Str};
- NP = CatEng.NP;
- CN = CatEng.CN;
- N = CatEng.N;
- N2 = CatEng.N2;
- A = CatEng.A;
- V = CatEng.V;
- V2 = CatEng.V2;
- Cl = CatEng.Cl;
- Pol = CatEng.Pol;
- Prep = CatEng.Prep;
- Conj = CatEng.Conj;
-lin
+lin
VerbToNounV2 vs = VerbToNoun vs ** {c2 = vs.c2; lock_N2=<>};
VerbToNoun v = {s = \\_,_ => v.s ! VPresPart;
@@ -35,6 +24,8 @@ mkPolSent cl = {s = \\f,b => case b of flag = NothingS ;
lock_PolSentence = <>};
+getSent psel = {s = psel.s ! Indep ! CPos} ;
+
sentToNoun ps = {s = \\_ => "\"" ++ ps.s ! Indep ! CPos ++ "\"";
a = agrP3 Sg; lock_NP=<>};
diff --git a/examples/nqueens/NatAscii.gf b/examples/nqueens/NatAscii.gf index bca73b48d..7c4e1289b 100644 --- a/examples/nqueens/NatAscii.gf +++ b/examples/nqueens/NatAscii.gf @@ -7,4 +7,6 @@ lin zero = "" ; lincat NE = {} ; +lin plus x y = x ++ y ; + } |
