1
0
forked from GitHub/gf-core

fixed SUMOEng with open instead of import for the Extension module

This commit is contained in:
ra.monique
2010-11-28 19:38:56 +00:00
parent 8e6421a03e
commit 667e7e67d3
7 changed files with 46 additions and 33 deletions

View File

@@ -1,30 +1,30 @@
--# -path=.:englishExtended:abstract:common: --# -path=.:englishExtended:abstract:common:
concrete BasicEng of Basic = CatEng - [Text] ** open DictLangEng, DictEng, ParadigmsEng, ResEng, Coordination, Prelude, ParamBasic, NounEng in { concrete BasicEng of Basic = open CatEng, ExtensionEng, DictLangEng, DictEng, ParadigmsEng, ResEng, Coordination, Prelude, ParamBasic, ConjunctionEng, NounEng in {
lincat lincat
Class = CN ; Class = CatEng.CN ;
El = NP ; El = CatEng.NP ;
Ind = NP ; Ind = CatEng.NP ;
Var = PN ; Var = CatEng.PN ;
SubClass = {} ; SubClass = {} ;
Inherits = {} ; Inherits = {} ;
Desc = CN ; Desc = CatEng.CN ;
Formula = PolSentence; Formula = ExtensionEng.PolSentence;
[El] = [NP]; [El] = ConjunctionEng.ListNP;
[Class] = [CN]; [Class] =ExtensionEng.ListCN ;
Stmt = StmtS ; Stmt = ExtensionEng.StmtS ;
lin lin
BaseClass = {s1,s2 = \\_,_ => ""; BaseClass = {s1,s2 = \\_,_ => "";
g = Neutr; g = Neutr;
lock_ListCN=<>}; lock_ListCN=<>};
ConsClass xs x = ConsCN xs x ; ConsClass xs x = ExtensionEng.ConsCN xs x ;
BaseEl c = {s1,s2 = \\_ => ""; BaseEl c = {s1,s2 = \\_ => "";
a = agrP3 Sg; a = agrP3 Sg;
lock_ListNP=<>}; lock_ListNP=<>};
ConsEl c xs x = ConsNP xs x ; ConsEl c xs x = ConjunctionEng.ConsNP xs x ;
and f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "and" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>}; and f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "and" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
or f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "or" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>}; or f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "or" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};

View File

@@ -1,4 +1,4 @@
concrete MergeEng of Merge = BasicEng ** open DictLangEng, DictEng, ParadigmsEng, ResEng, ParamBasic in { concrete MergeEng of Merge = BasicEng ** open DictLangEng, DictEng, ParadigmsEng, ResEng, ParamBasic,ExtensionEng in {
lin lin
-- single instances -- single instances

View File

@@ -1,4 +1,4 @@
concrete MidLevelOntologyEng of MidLevelOntology = MergeEng, ElementsEng ** open DictLangEng, DictEng, ParadigmsEng in { concrete MidLevelOntologyEng of MidLevelOntology = MergeEng, ElementsEng ** open DictLangEng, DictEng, ParadigmsEng,ExtensionEng in {
lin lin
-- individual instances : -- individual instances :

View File

@@ -6,8 +6,7 @@
-- which may be more suitable to open in applications. -- which may be more suitable to open in applications.
abstract DictLang = abstract DictLang =
Grammar, Grammar
Extension ** open Extension in {
** {
-- flags startcat=NP ; -- flags startcat=NP ;
} ; } ;

View File

@@ -1,8 +1,8 @@
--# -path=.:../../../lib/src/abstract:../../../lib/src/english:../../../lib/src/common --# -path=.:../../../lib/src/abstract:../../../lib/src/english:../../../lib/src/common
concrete DictLangEng of DictLang = concrete DictLangEng of DictLang =
GrammarEng, GrammarEng
ExtensionEng ** { ** open ExtensionEng in {
flags unlexer = text ; lexer = text ; flags unlexer = text ; lexer = text ;

View File

@@ -1,7 +1,7 @@
-- other functions needed for parsing -- other functions needed for parsing
abstract Extension = Cat ** { abstract Extension = {
@@ -9,6 +9,7 @@ cat
PolSentence; PolSentence;
StmtS ; StmtS ;
[CN]{2}; [CN]{2};
N; N2; A; V; V2; CN; NP; Cl; Pol; Prep; Conj; -- redefined from Cat
fun fun
VerbToNounV2 : V2 -> N2 ; -- discovering VerbToNounV2 : V2 -> N2 ; -- discovering
@@ -21,7 +22,7 @@ sentToNoun : PolSentence -> NP ;
UsePolSentence : Pol -> PolSentence -> StmtS ; UsePolSentence : Pol -> PolSentence -> StmtS ;
at_Prep : Prep ; at_Prep : Prep ;
per_Prep : Prep ; per_Prep : Prep ;
O1 : NP ; O1 : NP ;
O2 : NP ; O2 : NP ;
O3 : NP ; O3 : NP ;

View File

@@ -1,20 +1,33 @@
concrete ExtensionEng of Extension = CatEng ** open MorphoEng, ResEng, ConjunctionEng, StructuralEng, Prelude, ParadigmsEng, Coordination, ParamBasic in { --# -path=.:RGLExt:alltenses:../../lib/src/english
concrete ExtensionEng of Extension = open CatEng, MorphoEng, ResEng, ConjunctionEng, StructuralEng, Prelude, ParadigmsEng, Coordination, ParamBasic in {
lincat lincat
PolSentence = {s : SentForm => Polarity => Str ; flag : Flag}; PolSentence = {s : SentForm => Polarity => Str ; flag : Flag};
[CN] = {s1,s2 : Number => Case => Str ; g : Gender} ; [CN] = {s1,s2 : Number => Case => Str ; g : Gender} ;
StmtS = {s : Str}; 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}; VerbToNounV2 vs = VerbToNoun vs ** {c2 = vs.c2; lock_N2=<>};
VerbToNoun v = {s = \\_,_ => v.s ! VPresPart; VerbToNoun v = {s = \\_,_ => v.s ! VPresPart;
g = Masc}; g = Masc; lock_N=<>};
VerbToGerundA v = {s = \\_ => v.s ! VPresPart}; VerbToGerundA v = {s = \\_ => v.s ! VPresPart; lock_A=<>};
VerbToParticipeA v = {s = \\_ => v.s ! VPPart}; VerbToParticipeA v = {s = \\_ => v.s ! VPPart; lock_A=<>};
mkPolSent cl = {s = \\f,b => case b of mkPolSent cl = {s = \\f,b => case b of
{Pos => cl.s ! Pres ! Simul ! CPos ! ODir; {Pos => cl.s ! Pres ! Simul ! CPos ! ODir;
@@ -23,9 +36,9 @@ mkPolSent cl = {s = \\f,b => case b of
lock_PolSentence = <>}; lock_PolSentence = <>};
sentToNoun ps = {s = \\_ => "\"" ++ ps.s ! Indep ! Pos ++ "\""; sentToNoun ps = {s = \\_ => "\"" ++ ps.s ! Indep ! Pos ++ "\"";
a = agrP3 Sg}; a = agrP3 Sg; lock_NP=<>};
ConjCN conj ss = conjunctDistrTable2 Number Case conj ss ** {g = ss.g}; ConjCN conj ss = conjunctDistrTable2 Number Case conj ss ** {g = ss.g;lock_CN=<>};
BaseCN x y ={s1 = \\n,c => x.s ! n ! c ; BaseCN x y ={s1 = \\n,c => x.s ! n ! c ;
s2 = \\n,c => y.s ! n ! c ; s2 = \\n,c => y.s ! n ! c ;
@@ -40,19 +53,19 @@ at_Prep = mkPrep "at" ;
per_Prep = mkPrep "per" ; per_Prep = mkPrep "per" ;
O1 = {s = \\_ => "o1" ; O1 = {s = \\_ => "o1" ;
a = agrP3 Sg}; a = agrP3 Sg}**{lock_NP=<>};
O2 = {s = \\_ => "o2" ; O2 = {s = \\_ => "o2" ;
a = agrP3 Sg}; a = agrP3 Sg}**{lock_NP=<>};
O3 = {s = \\_ => "o3" ; O3 = {s = \\_ => "o3" ;
a = agrP3 Sg}; a = agrP3 Sg}**{lock_NP=<>};
O4 = {s = \\_ => "o4" ; O4 = {s = \\_ => "o4" ;
a = agrP3 Sg}; a = agrP3 Sg}**{lock_NP=<>};
O5 = {s = \\_ => "o5" ; O5 = {s = \\_ => "o5" ;
a = agrP3 Sg}; a = agrP3 Sg}**{lock_NP=<>};
} }