Commit 17d4de27 authored by jfschaefer's avatar jfschaefer
Browse files

rework StatementFin

parent 425f9f39
......@@ -7,6 +7,8 @@ abstract MCats = {
DefMObj; -- definite math object ("the largest element", ...)
MObj; -- math object ("prime number", "group", ...)
MObjProp; -- math object properties ("eve", "prime", "divisble by 2", ...)
-- Decl; -- declaration
Statement; -- statement ("every prime number is an integer")
StatementFin; -- finished statement
Definition; -- definition
......
......@@ -7,7 +7,8 @@ concrete MCatsEng of MCats = open SyntaxEng in {
MObj = CN;
MObjProp = AP;
Statement = Cl;
StatementFin = S;
-- statement as sentence or relative sentence ("such that ...")
StatementFin = { s : S ; rs : RS };
Definition = S;
Utterance = Utt;
......
......@@ -6,7 +6,7 @@ abstract NGrammar = MCats, Grammar, Extra, ExtraEngAbs ** {
restrict_mobj : MObjProp -> MObj -> MObj; -- "even" -> "integer" -> "even integer"
mobj_such_that : MObj -> Statement -> PosNegPol -> MObj; -- "integer such that ..."
mobj_such_that : MObj -> StatementFin -> MObj; -- "integer such that ..."
def_descr_mobj : MObj -> DefMObj; -- "cube" -> "the cube"
appo_mobj : MObj -> MathCN -> MObj; -- "an integer $ mi ( n ) $
it_pron_defmobj : DefMObj; -- "it"
......
......@@ -6,7 +6,7 @@ concrete NGrammarEng of NGrammar = MCatsEng, GrammarEng, ExtraEng ** open Syntax
restrict_mobj prop obj = mkCN prop obj;
def_descr_mobj obj = mkNP the_Art obj;
mobj_such_that obj restr pol = mkCN obj (mkRS pol (mkRCl restr));
mobj_such_that obj restr = mkCN obj restr.rs; -- (mkRS pol (mkRCl restr));
appo_mobj obj mcn = lin CN { s = \\number,case_ => obj.s ! number ! case_ ++ mcn.s ! number ! case_; g = obj.g };
it_pron_defmobj = mkNP it_Pron;
......@@ -14,22 +14,22 @@ concrete NGrammarEng of NGrammar = MCatsEng, GrammarEng, ExtraEng ** open Syntax
not_exists_statement obj = mkCl (mkNP no_Quant obj) | ExistsNP (mkNP no_Quant obj);
eq_defmobj_defmobj a b = mkCl a b;
state s pol = mkS pol s;
iff_statementfin a b = mkS (mkConj "iff") a b;
and_statementfin a b = mkS (mkConj "and") a b;
or_statementfin a b = mkS (mkConj "or") a b;
state stmt pol = { s = mkS pol stmt; rs = mkRS pol (mkRCl stmt) };
iff_statementfin a b = { s = mkS (mkConj "iff") a.s b.s; rs = mkRS (mkConj "iff") a.rs b.rs };
and_statementfin a b = { s = mkS (mkConj "and") a.s b.s; rs = mkRS (mkConj "and") a.rs b.rs };
or_statementfin a b = { s = mkS (mkConj "or") a.s b.s; rs = mkRS (mkConj "or") a.rs b.rs };
def_mobj_mobjprop obj prop = mkS (mkCl
(mkNP aSg_Det obj)
(PastPartAP (mkVPSlash (mkV2A (mkV "call" "calls" "called" "called" "calling") noPrep) prop)));
-- iff_definition defi condition = lin S { s = "iff" }; -- better solution for this?
iff_definition defi condition = lin S { s = defi.s ++ "iff" ++ condition.s }; -- better solution for this?
iff_definition defi condition = lin S { s = defi.s ++ "iff" ++ condition.s.s }; -- better solution for this?
def_defmobj_defmobj a b = mkCl a b;
def_appo_is_mobj definiendum representative definiens =
mkS (mkCl (DetCN {- mkNP is for some reason ambiguous -}
aSg_Det (appo_mobj definiendum representative)) definiens);
utter_statement s = mkUtt s;
utter_statement s = mkUtt s.s;
utter_definition s = mkUtt s;
......
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