Вы находитесь на странице: 1из 18

Context free

Grammar

By :
Kalpana
Nagle
Points to be discussed

• What is grammar.

• Who developed the context free grammar.


• More focused on context free grammar.



• Relation with artificial intelligent.

• Importance of context free grammar .

What is Grammar

• Grammar is the study of
rules governing the use of
language.

• The set of rules governing a


particular language is also
called the grammar of the
language; thus, each
language can be said to
have its own distinct
grammar.

• Grammar is part of the
What is Grammar…
Definition : A Grammar G is defined as an ordered

quadruple of the form



• G = ( VN, VT, S, P )

• where the entries are identified as follows: VN is a
nonterminal consisting of the lexical and syntactic
category labels;

• VT denotes a set of words, called the terminal of G;

• S is a special member of VN that, in addition to being
the label of the sentence category, identifies the
starting symbol of G; and

Noam Chomsky

Noam Chomsky
classified the
grammar into 4
categories .
Chomsky classification of
Grammar

Type Name Type of Productions

0 Unrestricted

1 Context-Sensitive

2 Context-Free

3 Regular, Finite
C ontext Free Grammar

A formal grammar is a precisely defined grammar,
typically used for computer programming
languages.


A generative grammar is a formal grammar that
can in some sense "generate" the well-formed
expressions of a natural language .


An entire branch of linguistic theory is based on
generative grammars. Generative grammars were
popularized by Noam Chomsky .



C ontext Free Grammar

Context-free grammars play a central role in the
description and design of programming languages
and compilers .

They are also used for analyzing the syntax of
natural languages .


Noam Chomsky has posited that all human
languages are based on context free grammars

Relation between AI and
C ontext Free Grammar
Natural language
processing

Natural language

processing ( NLP ) is the use
of computers to understand
human languages.

Generative grammar is the


use of rules to construct
sentences .



Noam Chomsky has posited
that all human languages are
based on context free
grammars

Natural language


processing
The goal of Natural Language Processing (NLP) is to
design and build a computer system that will analyze,
understand, and generate natural human-languages.

Applications of NLP include machine translation of
one human-language text to another;
Generation of human-language text such as fiction,
manuals, and general descriptions; interfacing to other
systems such as databases and robotic systems

Thus enabling the use of human-language type commands
and queries; and understanding human-language text to
provide a summary or to draw conclusions.

Natural language
 processing

One of the easiest tasks for a NLP system is to parse
a sentence to determine its syntax.



A more difficult task is determining the semantic
meaning of a sentence. One of the most difficult tasks
is the analysis of the context to determine the true
meaning and comparing that with other text.


Computer
s

Databas Artificial Intelligence Algorith Networki


es ms ng

Roboti Natural Language Processing Searc


cs h

Information Machine Language


Retrieval Translation Analysis

Semantics Parsing
Natural Language Processing

• Subfield of Artificial Intelligence (AI)
– Typically seen as one part of knowledge
representation

• Can also be seen as a combination of
computer science and linguistics.
– Computational Linguistics

• Applications
– English as a command language
– Database queries
– Translation systems
– Speech recognition systems
Linguistics


• Human language divides into five levels
1.
2.Phonology
• How sounds are used in language
3.
4.Morphology
• Word formation
5.
6.Syntax
• Sentence formation
7.
8.Semantics
• Sentence meaning
9.
ANY QUERIES :

Вам также может понравиться