From a traditional linguistic point of view, declarative descriptions of language are descriptions of the structures of language. In traditional terms, these are accounts of the paradigmatic and syntagmatic and realisational relations into which the units of language (texts, sentences, words, morphemes, phonemes, ...) enter.
From this linguistic point of view, procedural descriptions of language are descriptions of the procedures which define processes of analysis and generation of these structures from basic units.
From a formal, computational point of view, a declarative description is a description, e.g. a grammar, formalised in terms of an algebra such as formal language theory or automaton theory, propositional and predicate logic, or some other calculus.
From this formal point of view, the procedural element of a description consists of the rules of inference, by means of which more complex structures may be derived from simpler units, or simpler units can be composed into complex structures.
Since all theoretically interesting descriptions require both structures and rules of inference, it does not make too much sense to speak of "purely declarative" and "purely procedural" approaches. A maximally declarative or minimally procedural approach could be based on a logic with only one rule of inference, for example - typically modus ponens. On the same lines, a procedural approach may contain many more rules of inference. This distinction will be illustrated further below.
In computational linguistics, a theory of language consists primarily of a declarative component, in which structures are described by formal languages of various kinds, for which models are provided as mappings into computable abstract data structures.
The procedural component of a theory of language described by rules of inference, for which models are provided as mappings into algorithms.
In general, the abstract data structures are further modelled by specific data structures such as strings, lists, arrays in specific programming languages, and the algorithms are further modelled by procedures in these programming languages.
The main programming languages used in creating operational models in Computational Linguistics are typically:
Many other programming languages have also been used; C, C++ and Java are used nowadays for various practical purposes - C and C++ in general for large, efficient working systems, and Java in general for interactive systems with elaborate graphical user interfaces. With programming languages, however, the exception very often becomes the rule - LISP and Prolog have been used in commercial systems, and C, C++ and Java are also used in experimental research.
Note:
In linguistics, the terms
rule,
procedure,
rule application,
process,
algorithm are often used loosely.
For example, a rule is sometimes regarded as a language specific
convention, such as final devoicing in German, and a process is
regarded as a universal physical constraint such as some types of assimilation.
For very general rules of language, i.e. universal constraints, the term
principle is sometimes used.
In some theories of language a principle is parametrised, so that different
settings of the parameters of a principle (e.g. the
different word orders which are found in different languages) define the
differences between languages.