Although not properly part of the DATR language, most existing implementations of the language make available a collection of system directives designed to facilitate input or output or to abbreviate the representation of DATR descriptions. Since such facilities play quite a large role in the practical usability of the language, we will list those most commonly found in existing implementations, comment briefly on the function of each, and give an example of usage.
DATR descriptions can be spread across more than one file and the components loaded as needed:
# load 'filename'.For example:
# load 'passive1.dtr'.Every DATR theory gives rise to an infinite set of theorems. For a theorem dump to be both possible and useful one requires some way of telling the system which theorems one is interested in having proved. A crude but useful way of doing this is provided by hide and show declarations. The former allows one to suppress theorems associated with the listed nodes and the latter allows one to dump theorems associated with the listed paths.
# hide list of nodes.For example:
# show list of paths.
# hide NIL NP_ARG PP_ARG PASSIVE.
# show <syn form> <mor form>.
These two simple output declarations are convenient for debugging descriptions
but too crude to deal with the fact that one normally wishes to see
different sets of paths for different types of nodes (thus nouns may
have case whilst verbs do not, and verbs may have tense whilst nouns
do not). In the light of this observation, some recent implementations
of the language provide a conditional showif declaration:
# showif path = atom: list of paths.If a node returns atom and the value of path, then the paths listed are to be shown for that node. Here are a couple of examples of of possible showif use:
# showif <cat> = noun: <case> <number>.
# showif <cat> = verb: <tense> <aspect>.
Implementations of DATR standardly infer the type of an identifier by reference to the case of the initial letter. Those that begin with an upper case letter are taken to be nodes and those that do not are taken to be atoms. But it is useful to be able to override this default typing on occasion and this can be done by explicit declaration:
# atom list of atoms.For example:
# node list of nodes.
# atom IF THEN ELSE CASE.
# node eecummings.