MathNat (Mathematical texts in Controlled Natural language) is a project for developing tools to enable automatic formalisation of mathematical text. We proceed in three steps as followed:
Here is a small introductory presentation.
The source package of MathNat: mathnat version 1.0 (release date: 12 October 2011).
To setup MathNat, you need following softwares:
Haskell Platform is required to compile GF as well as MathNat. Instructions for installing Haskell Platform are given on its homepage. I give below tailored instructions partially taken from GF install page. On Linux distribution, it can be installed as:
sudo apt-get install haskell-platform (Debian/Ubuntu) sudo yum install haskell-platform (Fedora)
For GF, you need some C libraries:
sudo apt-get install libghc6-terminfo-dev (Debian/Ubuntu) sudo yum install ghc-terminfo-devel (Fedora)
cabal program should be installed with the Haskell Platform. You need to update it with command:
sudo cabal update
If the program
cabal asks for an upgrade, then follow its instructions. Most probably, it will ask you to run the following command:
sudo cabal install --global cabal-install
Other ways of installing the Haskell platform can be found on Haskell homepage.
The BNF Converter (bnfc) is available on hackage. Therefore, it could be installed with
sudo cabal install --global bnfc
Alternatively, install it directly from the distribution:
sudo apt-get install bnfc (Debian/Ubuntu) sudo yum install bnfc (Fedora)
The Grammatical Framework is also available on hackage. Therefore, it could be installed with
sudo cabal install --global gf
If you get errors regarding the conflicts in dependencies, you probably need to update some of the libraries of Haskell compiler (GHC). These libraries are usually available as "libghc6-library_name-dev" in your Linux distribution. For instance, if you get the error something like that:
base-184.108.40.206 requires syb==0.1.0.2 .... requires json-05...
You need to update libraries:
You may do it as shown below. To get the hints about the exact names of these libraries, press tab while typing the following command:
sudo apt-get install libghc6-base-dev libghc6-json-dev libghc6-syb-dev
Other ways can be found on GF homepage.
Download the source package of MathNat: mathnat version 1.0 and uncompress it.
Go to the directory
mathnat and type
You can do these steps with the following commands:
wget http://www.lama.univ-savoie.fr/~humayoun/repos/mathnat-1.0.tar.gz (downloading mathnat) tar -zxvf mathnat-1.0.tar.gz (uncompressing) cd mathnat make
Go to the directory
mathnat and execute the following command:
The output will be displayed on the console. You can save this output with the Unix command:
./mathnat examples/ex.nat >examples/ex.nat.output
For stable examples, see
For each example
ex.nat, you'll find its output already stored in
For questions and queries, contact me by email: humayoun AT gmail DOT com.
Last update: Thu Jan 19 18:43:47 2012