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

Commit 9388811c authored by jfschaefer's avatar jfschaefer

write-up discussion (smglom file structure, one-word example, example sentence)

parent ec4ef56a
\documentclass[11pt]{bluenote}
\usepackage{a4wide,url,xspace,calbf,wrapfig,amstext}
\usepackage{a4wide,url,xspace,calbf,wrapfig,amstext,amssymb}
\usepackage[show]{ed}
\usepackage{stex-logo}
\usepackage{listings}
\lstset{language=TeX,basicstyle=\sf}
\lstdefinelanguage{GF}{
morekeywords={ abstract, concrete, resource, interface, instance,
incomplete, of, with, open,
cat, fun, lincat, lin, oper, flags, param
},
morecomment=[l]{--},
morecomment=[s]{\{-}{-\}},
morestring=[b]"
}
\usepackage{xcolor}
\def\red#1{\textcolor{red}{#1}}
......@@ -35,6 +44,7 @@
\def\defemph#1{\textbf{#1}}
\def\GF{\textsf{GF}\xspace}
\newcommand{\divides}{\mid}
\blueProject{\smglom}\blueURI{http://mathhub.info/help/SMGloM}
\usepackage{hyperref}
......@@ -96,6 +106,53 @@ Also we should look at the Plato
System~\cite{Wagner:coamas10,WAB:PAMbTEaPAS,AutexierEtAl:notations-texmacs-plato};
see also ~\url{https://page.mi.fu-berlin.de/cbenzmueller/papers/J14.pdf}
\section{File Structure in \smglom}
\smglom is structured into modules. Each module roughly corresponds to a mathematical
concept. For example, for the \texttt{emptyset} module, we would have:
\begin{compactenum}
\item \texttt{emptyset.tex}: The signature file, which defines things like the
empty set and the property of being empty/non-empty.
\item \texttt{emptyset.gf}: The abstract \GF grammar. It assigns
categories to the different concepts/words introduced in \texttt{emptyset.tex}.
We would like to be able to generate this file from \texttt{emptyset.tex}.
Currently, we do not know how these categories should look like
(see also section \ref{sec:oneWordEx}).
\item \texttt{emptyset.mmt}: The \mmt declarations of the introduced concepts.
Ideally, we would like to generate these automatically as well.
\item \texttt{emptyset.ll.tex}: The language file for language \texttt{ll}
(could be \texttt{en}, \texttt{de}, ...) provides natural-language descriptions
of the concepts.
\item \texttt{emptyset.ll.gf}: The concrete \GF grammar, corresponding to
\texttt{emptyset.ll.tex}. It should be generated from \texttt{emptyset.ll.tex}
and linearize the words using the resource grammar.
\end{compactenum}
We will probably need a separate abstract \GF grammar that defines all the categories
we need.
\section{Case Study: One-word Example\label{sec:oneWordEx}}
We use the word \emph{``number''} as a minimal example.
Our goal is to have a grammar that is as semantic as possible, while still
being able to use \GF's resource grammar.
Our current example looks like this:
\lstinputlisting[language=GF]{oneWordExample.gf}
\lstinputlisting[language=GF]{oneWordExampleEN.gf}
\section{Case Study: Definition of Prime Numbers}
To understand the problem better, we consider the following example sentence:
\begin{quote}
A positive integer $n$ is called prime, iff there is no positive integer $1 < m < n$
with $m \divides n$.
\end{quote}
We would like to parse this sentence with \GF (\lstinline[language={}]{p -cat=EN})
and linearize it into \mmt (\lstinline[language={}]{l -cat=MMT}):
$$\forall m:\mathbb{N}.\texttt{prime}(n) \Leftrightarrow
\nexists m : \mathbb{N}. 1 < m < n \land m \divides n$$
\section{Question: How to use \GF for Formulae}
\ednote{I do not know yet}
......
{-
a minimal example, in which we try to find out how to
represent the word "number"
-}
abstract oneWordExample = {
cat
P1; -- unary predicate, i.e. I -> O
fun
number : P1; -- we consider nouns predicates
}
--# -path=.:present
concrete oneWordExampleEN of oneWordExample = open SyntaxEng,ParadigmsEng in {
lincat
P1 = N; -- problem: Predicates can also be verbs
lin
number = mkN "number";
}
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