Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SMGloM
GF
Commits
da1df3c7
Commit
da1df3c7
authored
Jul 13, 2018
by
jfschaefer
Browse files
replace N prefix (natural language) by D prefix (discourse)
parent
00281f58
Changes
15
Hide whitespace changes
Inline
Side-by-side
gf/
N
Grammar.gf
→
gf/
D
Grammar.gf
View file @
da1df3c7
-- abstract grammar for natural language
abstract
N
Grammar = MCats, Grammar, Extra, ExtraEngAbs ** {
abstract
D
Grammar = MCats, Grammar, Extra, ExtraEngAbs ** {
fun
PosPol : PosNegPol;
NegPol : PosNegPol;
...
...
gf/
N
GrammarEng.gf
→
gf/
D
GrammarEng.gf
View file @
da1df3c7
concrete
N
GrammarEng of
N
Grammar = MCatsEng, GrammarEng, ExtraEng ** open SyntaxEng, ParadigmsEng, UtilsEng, ResEng, ParamX in {
concrete
D
GrammarEng of
D
Grammar = MCatsEng, GrammarEng, ExtraEng ** open SyntaxEng, ParadigmsEng, UtilsEng, ResEng, ParamX in {
oper
call_V2A : V2A = mkV2A (mkV "call" "calls" "called" "called" "calling") noPrep;
call_V3 : V3 = mkV3 (mkV "call" "calls" "called" "called" "calling");
...
...
gf/
N
GrammarGer.gf
→
gf/
D
GrammarGer.gf
View file @
da1df3c7
concrete
N
GrammarGer of
N
Grammar = MCatsGer, GrammarGer** open SyntaxGer, ParadigmsGer, UtilsGer, ResGer, ParamX, Prelude in {
concrete
D
GrammarGer of
D
Grammar = MCatsGer, GrammarGer** open SyntaxGer, ParadigmsGer, UtilsGer, ResGer, ParamX, Prelude in {
oper
call_V2A : V2A = mkV2A (ParadigmsGer.mkV "heißen");
call_V3 : V3 = mkV3 (ParadigmsGer.mkV "heißen");
...
...
gf/
N
GrammarLog.gf
→
gf/
D
GrammarLog.gf
View file @
da1df3c7
concrete
N
GrammarLog of
N
Grammar = MCatsLog ** {
concrete
D
GrammarLog of
D
Grammar = MCatsLog ** {
oper
ofx : Str -> Str = \s -> s ++ "(" ++ "x" ++ ")";
lwrap : Str -> Str = \f -> "(" ++ "λx." ++ f ++ ")";
...
...
gf/
N
Lexicon.gf
→
gf/
D
Lexicon.gf
View file @
da1df3c7
-- natural language lexicon
abstract
N
Lexicon = MCats,
N
LexiconMObj, Cat ** {
abstract
D
Lexicon = MCats,
D
LexiconMObj, Cat ** {
fun
-- integer_MObj : MObj;
-- set_MObj : MObj;
...
...
gf/
N
LexiconEng.gf
→
gf/
D
LexiconEng.gf
View file @
da1df3c7
concrete
N
LexiconEng of
N
Lexicon = MCatsEng,
N
LexiconMObjEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
concrete
D
LexiconEng of
D
Lexicon = MCatsEng,
D
LexiconMObjEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
lin
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
...
...
gf/
N
LexiconGer.gf
→
gf/
D
LexiconGer.gf
View file @
da1df3c7
concrete
N
LexiconGer of
N
Lexicon = MCatsGer ** open SyntaxGer, ParadigmsGer, ResGer, UtilsGer in {
concrete
D
LexiconGer of
D
Lexicon = MCatsGer ** open SyntaxGer, ParadigmsGer, ResGer, UtilsGer in {
lin
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
...
...
gf/
N
LexiconLog.gf
→
gf/
D
LexiconLog.gf
View file @
da1df3c7
concrete
N
LexiconLog of
N
Lexicon = MCatsLog,
N
LexiconMObjLog ** {
concrete
D
LexiconLog of
D
Lexicon = MCatsLog,
D
LexiconMObjLog ** {
lin
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
...
...
gf/
N
LexiconMObj.gf
→
gf/
D
LexiconMObj.gf
View file @
da1df3c7
...
...
@@ -2,7 +2,7 @@
-- Some physics papers were included, so a few physical nouns are contained as well.
-- The machine learning algorithm is still under development and more refined and more complete results can be expected.
-- Currently all nouns are of type MObj. This shouldn't be the case, as e.g. optimality does not represent a mathematical object.
abstract
N
LexiconMObj = MCats ** {
abstract
D
LexiconMObj = MCats ** {
fun
set_MObj : MObj;
function_MObj : MObj;
...
...
gf/
N
LexiconMObjEng.gf
→
gf/
D
LexiconMObjEng.gf
View file @
da1df3c7
...
...
@@ -3,7 +3,7 @@
-- The machine learning algorithm is still under development and more refined and more complete results can be expected.
-- Currently all nouns are of type MObj. This shouldn't be the case, as e.g. optimality does not represent a mathematical object.
-- NOTE: IRREGULAR NOUNS ARE NOT HANDLED PROPERLY (consider e.g. "vertex" (pl. "vertices"))
concrete
N
LexiconMObjEng of
N
LexiconMObj = MCatsEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
concrete
D
LexiconMObjEng of
D
LexiconMObj = MCatsEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
-- oper
-- mkMObj : N -> MObj = \noun -> let obj : CN = mkCN noun in
-- lin MObj {
...
...
gf/
N
LexiconMObjLog.gf
→
gf/
D
LexiconMObjLog.gf
View file @
da1df3c7
concrete
N
LexiconMObjLog of
N
LexiconMObj = MCatsLog ** {
concrete
D
LexiconMObjLog of
D
LexiconMObj = MCatsLog ** {
lin
set_MObj = "set" ++ "(" ++ "x" ++ ")";
function_MObj = "function" ++ "(" ++ "x" ++ ")";
...
...
gf/MNlp.gf
View file @
da1df3c7
-- Collects all the stuff we have for parsing math
abstract MNlp =
N
Lexicon,
N
Grammar, FGrammar, FLexicon ** {
abstract MNlp =
D
Lexicon,
D
Grammar, FGrammar, FLexicon ** {
flags
startcat = Utterance;
}
gf/MNlpEng.gf
View file @
da1df3c7
concrete MNlpEng of MNlp =
N
LexiconEng,
N
GrammarEng, FGrammarEng, FLexiconEng ** {
concrete MNlpEng of MNlp =
D
LexiconEng,
D
GrammarEng, FGrammarEng, FLexiconEng ** {
}
gf/MNlpGer.gf
View file @
da1df3c7
concrete MNlpGer of MNlp =
N
LexiconGer,
N
GrammarGer, FGrammarGer, FLexiconGer ** {
concrete MNlpGer of MNlp =
D
LexiconGer,
D
GrammarGer, FGrammarGer, FLexiconGer ** {
}
gf/MNlpLog.gf
View file @
da1df3c7
concrete MNlpLog of MNlp =
N
LexiconLog,
N
GrammarLog, FGrammarLog, FLexiconLog ** {
concrete MNlpLog of MNlp =
D
LexiconLog,
D
GrammarLog, FGrammarLog, FLexiconLog ** {
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment