Attention: Maintenance on monday 19.04.2021 from 07:00 - 13:00 (Gitlab and Mattermost are offline!)

Commit b577b4f7 authored by jfschaefer's avatar jfschaefer

added description about structure of molto math grammar

parent cdb0c6de
......@@ -20,6 +20,7 @@
......@@ -183,6 +184,39 @@ The \GF already has the math grammars from the WebAlt and Molto projects~\cite{M
they can be found at~\cite{molto-gf:on}. The work is described
\subsection{Understanding the MGL structure}
Let's take a closer look at the MGL (Mathematics Grammar Library) structure.
In the \texttt{abstract} directory, the semantic grammars are defined. In \texttt{resources},
these concepts are mapped to the corresponding syntactic representations.
These are for most languages similar, so \gfinline{incomplete concrete} grammars are used that
are not language-specific.
In the language directories, a lexicon is defined with all the words. Also, concrete grammars for
each concept are defined. These files bring all dependencies together and treat language-specific
special cases (when the semantic-to-syntactic mapping differs).
\subsubsection{Example \gfinline{root}}
The \gfinline{root} function is declared in \texttt{abstract/} as
root : ValNum -> Index -> ValNum;
In \texttt{resources/Arith1I}, which is an \gfinline{incomplete concrete}
grammar for \gfinline{Arith1}, \gfinline{root} gets linearized in the following way:
root = DefGenCNidx root_CN ;
\gfinline{DefGenCNidx} is defined in \texttt{resources/} as
DefGenCNidx : CN -> MathObj -> MathIdx -> MathObj ;
and in \texttt{resources/} it is defined it as
DefGenCNidx = \cn,obj,i ->
mkNP (mkDet the_Quant (mkOrd i))
(modCN cn (mkAdv my_possess_Prep obj)) ;
Everything is brought together in \texttt{english/}.
The word \gfinline{root_CN} is defined in \texttt{english/}.
Markdown is supported
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