In
phrase structure grammar
The term phrase structure grammar was originally introduced by Noam Chomsky as the term for grammar studied previously by Emil Post and Axel Thue ( Post canonical systems). Some authors, however, reserve the term for more restricted grammars in ...
s, such as
generalised phrase structure grammar Generalized phrase structure grammar (GPSG) is a framework for describing the syntax and semantics of natural languages. It is a type of constraint-based phrase structure grammar. Constraint based grammars are based around defining certain syntac ...
,
head-driven phrase structure grammar Head-driven phrase structure grammar (HPSG) is a highly lexicalized, constraint-based grammar
developed by Carl Pollard and Ivan Sag. It is a type of phrase structure grammar, as opposed to a dependency grammar, and it is the immediate successor ...
and
lexical functional grammar, a feature structure is essentially a set of
attribute–value pairs. For example, the attribute named ''number'' might have the value ''singular''. The value of an attribute may be either
atomic, e.g. the symbol ''singular'', or complex (most commonly a feature structure, but also a list or a set).
A feature structure can be represented as a
directed acyclic graph
In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one v ...
(DAG), with the nodes corresponding to the variable values and the paths to the variable names. Operations defined on feature structures, e.g.
unification, are used extensively in phrase structure grammars. In most theories (e.g.
HPSG), operations are strictly speaking defined over equations describing feature structures and not over feature structures themselves, though feature structures are usually used in informal exposition.
Often, feature structures are written like this:
Here there are the two features ''category'' and ''agreement''. ''Category'' has the value ''noun phrase'' whereas the value of ''agreement'' is indicated by another feature structure with the features ''number'' and ''person'' being ''singular'' and ''third''.
This particular notation is called ''attribute value matrix'' (AVM).
The
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** '' The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
has two columns, one for the feature names and the other for the values. In this sense a feature structure is a list of key-value pairs. The value might be atomic or another feature structure. This leads to another notation for feature structures: the use of
tree
In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
s. In fact, some systems (such as
PATR-II) use
S-expression
In computer programming, an S-expression (or symbolic expression, abbreviated as sexpr or sexp) is an expression in a like-named notation for nested list (tree-structured) data. S-expressions were invented for and popularized by the programming la ...
s to represent feature structures.
External links
Feature Structuressection of an online
Prolog
Prolog is a logic programming language associated with artificial intelligence and computational linguistics.
Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily a ...
course
Feature Structuresin Text Encoding for Interchange (
TEI)
Grammar