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 @@
\def\blue#1{\textcolor{blue}{#1}}
\def\nlex#1{``\textcolor{teal}{#1}''}
\def\qv#1{?#1}
\def\gfinline#1{\lstinline[language=GF]{#1}}
\usepackage[hyperref=auto,style=alphabetic,isbn=false,backend=bibtex]{biblatex}
\addbibresource{kwarcpubs.bib}
......@@ -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
in~\cite{SalXam:tgml12,CaprottiSaludes:OpenMathUIWiP2012,ArcCapRanSal:ugmam12}
\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/Arith1.gf} as
\begin{lstlisting}[language=GF]
root : ValNum -> Index -> ValNum;
\end{lstlisting}
In \texttt{resources/Arith1I}, which is an \gfinline{incomplete concrete}
grammar for \gfinline{Arith1}, \gfinline{root} gets linearized in the following way:
\begin{lstlisting}[language=GF]
root = DefGenCNidx root_CN ;
\end{lstlisting}
\gfinline{DefGenCNidx} is defined in \texttt{resources/Math.gf} as
\begin{lstlisting}[language=GF]
DefGenCNidx : CN -> MathObj -> MathIdx -> MathObj ;
\end{lstlisting}
and in \texttt{resources/MathI.gf} it is defined it as
\begin{lstlisting}[language=GF]
DefGenCNidx = \cn,obj,i ->
mkNP (mkDet the_Quant (mkOrd i))
(modCN cn (mkAdv my_possess_Prep obj)) ;
\end{lstlisting}
Everything is brought together in \texttt{english/Arith1Eng.gf}.
The word \gfinline{root_CN} is defined in \texttt{english/LexiconEng.gf}.
\section{Conclusion}\label{sec:concl}
\ednote{tbw.}
......
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