Commit da1df3c7 authored by jfschaefer's avatar jfschaefer
Browse files

replace N prefix (natural language) by D prefix (discourse)

parent 00281f58
-- abstract grammar for natural language
abstract NGrammar = MCats, Grammar, Extra, ExtraEngAbs ** {
abstract DGrammar = MCats, Grammar, Extra, ExtraEngAbs ** {
fun
PosPol : PosNegPol;
NegPol : PosNegPol;
......
concrete NGrammarEng of NGrammar = MCatsEng, GrammarEng, ExtraEng ** open SyntaxEng, ParadigmsEng, UtilsEng, ResEng, ParamX in {
concrete DGrammarEng of DGrammar = 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");
......
concrete NGrammarGer of NGrammar = MCatsGer, GrammarGer** open SyntaxGer, ParadigmsGer, UtilsGer, ResGer, ParamX, Prelude in {
concrete DGrammarGer of DGrammar = 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");
......
concrete NGrammarLog of NGrammar = MCatsLog ** {
concrete DGrammarLog of DGrammar = MCatsLog ** {
oper
ofx : Str -> Str = \s -> s ++ "(" ++ "x" ++ ")";
lwrap : Str -> Str = \f -> "(" ++ "λx." ++ f ++ ")";
......
-- natural language lexicon
abstract NLexicon = MCats, NLexiconMObj, Cat ** {
abstract DLexicon = MCats, DLexiconMObj, Cat ** {
fun
-- integer_MObj : MObj;
-- set_MObj : MObj;
......
concrete NLexiconEng of NLexicon = MCatsEng, NLexiconMObjEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
concrete DLexiconEng of DLexicon = MCatsEng, DLexiconMObjEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
lin
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
......
concrete NLexiconGer of NLexicon = MCatsGer ** open SyntaxGer, ParadigmsGer, ResGer, UtilsGer in {
concrete DLexiconGer of DLexicon = MCatsGer ** open SyntaxGer, ParadigmsGer, ResGer, UtilsGer in {
lin
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
......
concrete NLexiconLog of NLexicon = MCatsLog, NLexiconMObjLog ** {
concrete DLexiconLog of DLexicon = MCatsLog, DLexiconMObjLog ** {
lin
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
......
......@@ -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 NLexiconMObj = MCats ** {
abstract DLexiconMObj = MCats ** {
fun
set_MObj : MObj;
function_MObj : MObj;
......
......@@ -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 NLexiconMObjEng of NLexiconMObj = MCatsEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
concrete DLexiconMObjEng of DLexiconMObj = MCatsEng ** open SyntaxEng, ParadigmsEng, UtilsEng in {
-- oper
-- mkMObj : N -> MObj = \noun -> let obj : CN = mkCN noun in
-- lin MObj {
......
concrete NLexiconMObjLog of NLexiconMObj = MCatsLog ** {
concrete DLexiconMObjLog of DLexiconMObj = MCatsLog ** {
lin
set_MObj = "set" ++ "(" ++ "x" ++ ")";
function_MObj = "function" ++ "(" ++ "x" ++ ")";
......
-- Collects all the stuff we have for parsing math
abstract MNlp = NLexicon, NGrammar, FGrammar, FLexicon ** {
abstract MNlp = DLexicon, DGrammar, FGrammar, FLexicon ** {
flags
startcat = Utterance;
}
concrete MNlpEng of MNlp = NLexiconEng, NGrammarEng, FGrammarEng, FLexiconEng ** {
concrete MNlpEng of MNlp = DLexiconEng, DGrammarEng, FGrammarEng, FLexiconEng ** {
}
concrete MNlpGer of MNlp = NLexiconGer, NGrammarGer, FGrammarGer, FLexiconGer ** {
concrete MNlpGer of MNlp = DLexiconGer, DGrammarGer, FGrammarGer, FLexiconGer ** {
}
concrete MNlpLog of MNlp = NLexiconLog, NGrammarLog, FGrammarLog, FLexiconLog ** {
concrete MNlpLog of MNlp = DLexiconLog, DGrammarLog, FGrammarLog, FLexiconLog ** {
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment