Context-free grammar


De DataFranca

en construction


Définition

xxxxxxx

Français

xxxxxxx

Anglais

context-free grammar

A context-free grammar is defined to be a 5-tuple (P, A, N, T, S) with components as follows:

P A set of grammar rules or productions, that is, items of the form X → a, where X is a member of the set N, that is, a non-terminal symbol, and a is a string over the alphabet A.

An example would be the rule NP → ART ADJ N which signifies that a Noun Phrase can be an ARTicle followed by an ADJective followed by a Noun, or N → horse, which signifies that horse is a Noun. NP, ART, ADJ, and N are all non-terminal symbols, and horse is a terminal symbol.

A the alphabet of the grammar, equal to the disjoint union of N and T
N the set of non-terminal symbols (i.e. grammatical or phrasal categories)
T the set of terminal symbols (i.e. words of the language that the grammar defines)
S a distinguished non-terminal, normally interpreted as representing a full sentence (or program, in the case of a programming language grammar)


Source : UNWS Natural Language Processing Dictionary