DATR Compilers

The DATR Language
For information on the syntax and semantics of DATR go to http://www.datr.org.uk/

No need to download anything! Visit Raphael Finkel's (University of Kentucky) CATS CLAW DATR evaluator at http://www.cs.uky.edu/~raphael/linguistics/datr.cgi. First, identify the number of files your theory contains in the bottom section. This will allow you to upload that number of files. Choose one file for each slot. By default, your results will be listed in a color-coded table. If you require simpler formatting, check the box labeled "List results instead of fancy formatting." Click submit. Optionally, you may copy your theory into the top section instead of uploading files.

You can download an easy-to-install free-standing version for Windows, called WinDATR from Brighton Natural Language Technology Group's download page at http://www.brighton.ac.uk/nltg/downloads/datr/

You can run DATR within Terminal by compiling it into prolog. If you already use a particular prolog system, we suggest you download the DATR 2.11.0 core system and follow the instructions on installation in the read_me file. This includes information about customization for a number of the major prolog systems.

Here’s a possible installation which uses SWI-Prolog, where we assume that the bash shell is used in Terminal:

1) Download and install the latest stable release of SWI-Prolog for MacOS.
2) Download the DATR 2.11.0 core system.
3) Place the folder datr-2.11.0 in your preferred location. (e.g. /Users/dunstanbrown/datr-2.11.0, as assumed in step 4)
4) Add the following line to the .bashrc startup file (where /Users/dunstanbrown/ will be substituted by the preferred location in which you placed datr-2.11.0):
export DATR=/Users/dunstanbrown/datr-2.11.0
5) Start SWI-Prolog by typing swipl
6) In SWI-Prolog type ['$DATR/swiprolog.pl'].

A saved state called 'datr' (or something else of your choosing) can be created by typing qsave_program(datr).

As with the UNIX-based MacOS system, prolog is required. Follow the installation instructions in the readme file at http://www.brighton.ac.uk/nltg/downloads/datr/

Getting started
If you are using WinDATR, right-click on the DATR file and select the dump option to create a theorem file.

If you have installed DATR on a Mac or Linux/Unix, according to the instructions above, then you'll be running DATR from the command line. Call DATR from the saved state, or by compiling it into prolog.

Here's an example session:

1) Navigate through the directory structure to the directory where your DATR files are located. Once you've called the saved state or compiled DATR into prolog, you'll get the prolog ?- prompt.

bash-3.2$ datr
Sussex/Brighton DATR (Version 2.11.0 -- 24 November 2009)

DATR user interface support library loaded.
Type 'datr_help.' to Prolog prompt for more details.


2) Here we compile the file ch2_koryak.dtr into DATR, by typing dc(ch2_koryak). (The same effect can be achieved by typing datr_compile('ch2_koryak.dtr').):

Sussex/Brighton DATR (Version 2.11.0 -- 24 November 2009)

DATR user interface support library loaded.
Type 'datr_help.' to Prolog prompt for more details.

?- dc(ch2_koryak).

3) To see the theorems which can be inferred from the fragment, type datr_theorem. The theorems will output to the screen.
(These will be what can be inferred for the paths which have been declared in the show declarations.)

4) You can also compile and dump to a file by typing the following. In the case of ch2_koryak.dtr this will produce a file ch2_koryak.dmp with the theorems in:

?- du(ch2_koryak).

Enter your Network Morphology username.
Enter the password that accompanies your username.