Changes

313 bytes added ,  15:21, April 9, 2012
reposition link, note how many sentences can be generated, clarify, add categories
Line 13: Line 13:  
These grammatical systems were referred to by Chomsky as ''transformational grammars''.  Other linguists have developed variants; together these are known as ''generative grammars''.  
 
These grammatical systems were referred to by Chomsky as ''transformational grammars''.  Other linguists have developed variants; together these are known as ''generative grammars''.  
   −
The basic idea of a generative grammar is to provide a set of rules which are capable of generating all possible grammatical sentences in some language; the rules also constrain generation so that only grammatical sentences are generated. The rules can also be used in reverse to parse a sentence and check if it is grammatical.
+
The basic idea of a '''generative grammar''' is to provide a set of rules which are capable of generating all possible grammatical sentences in some language; the rules must constrain the generation so that only grammatical sentences are generated. The rules can also be used in reverse to parse a sentence and check if it is grammatical.
    
==Example of a very simple generative grammar==
 
==Example of a very simple generative grammar==
−
This very simple example can handle only a tiny subset of English and should not be taken seriously as a guide to English grammar or vocabulary. It is based on an example by David Crystal.
+
This very simple example can handle only a tiny subset of English and should not be taken seriously as a guide to English grammar or vocabulary. It is based on an example by David Crystal
 
<ref>{{cite book  
 
<ref>{{cite book  
 
| last = Crystal  
 
| last = Crystal  
Line 25: Line 25:  
| isbn = 978052126438
 
| isbn = 978052126438
 
| pages = page 97
 
| pages = page 97
−
}}</ref>  
+
}}</ref> and is a slight extension of an example on slide 9 of this lecture.
−
 
+
<ref>{{cite web
−
The symbol "->" means "can be replaced by". When there are several items on the right hand side separated by commas, any one of these items can be selected. The comments preceded by "#" are not part of the generative grammar, but hopefully will help folks understand the example a little better.
+
| url = http://www.cs.princeton.edu/~rywang/99f126/slides/16th.pdf
 +
| title = Lecture notes: Formal Languages
 +
| accessdate = 2012-04-07}}
 +
</ref>
    
  ''Sentence''  ->  ''NounPhrase'' ''VerbPhrase''        # A ''Sentence'' consists of a ''NounPhrase'' followed by a ''VerbPhrase''
 
  ''Sentence''  ->  ''NounPhrase'' ''VerbPhrase''        # A ''Sentence'' consists of a ''NounPhrase'' followed by a ''VerbPhrase''
 
  ''NounPhrase'' ->  ''Determiner'' ''Noun''              # A ''NounPhrase'' consists of a ''Determiner'' followed by a ''Noun''
 
  ''NounPhrase'' ->  ''Determiner'' ''Noun''              # A ''NounPhrase'' consists of a ''Determiner'' followed by a ''Noun''
 
  ''VerbPhrase'' ->  ''Verb'' ''NounPhrase''              # A ''VerbPhrase'' consists of a ''Verb'' followed by a ''NounPhrase''
 
  ''VerbPhrase'' ->  ''Verb'' ''NounPhrase''              # A ''VerbPhrase'' consists of a ''Verb'' followed by a ''NounPhrase''
−
  ''Determiner'' ->  '''a''', '''the'''                        # A ''Determiner''  is either '''a''' or '''the'''
+
  ''Determiner'' ->  '''a''', '''the'''                        # A ''Determiner''  is one of: '''a''' or '''the'''
 
  ''Noun''      ->  '''boy''', '''girl''', '''dog'''                # A ''Noun'' is one of: '''boy''' or '''girl''' or '''dog'''   
 
  ''Noun''      ->  '''boy''', '''girl''', '''dog'''                # A ''Noun'' is one of: '''boy''' or '''girl''' or '''dog'''   
 
  ''Verb''      ->  '''chased''', '''heard''', '''saw'''            # A ''Verb'' is one of: '''chased''' or '''heard''' or '''saw'''
 
  ''Verb''      ->  '''chased''', '''heard''', '''saw'''            # A ''Verb'' is one of: '''chased''' or '''heard''' or '''saw'''
 +
 +
Notation used above:
 +
:The symbol "->" means "can be replaced by". 
 +
:When there are several items on the right hand side separated by commas, any one of these items can be selected.
 +
:The comments preceded by "#" are not part of the generative grammar, but hopefully will help folks understand the example a little better.
    
By making appropriate substitutions we can generate such sentences as:
 
By making appropriate substitutions we can generate such sentences as:
Line 46: Line 54:  
:''Determiner'' ''Noun'' ''Verb'' ''NounPhrase''
 
:''Determiner'' ''Noun'' ''Verb'' ''NounPhrase''
 
:''Determiner'' ''Noun'' ''Verb'' ''Determiner'' ''Noun''
 
:''Determiner'' ''Noun'' ''Verb'' ''Determiner'' ''Noun''
 +
 +
By choosing the various options for ''Determiner'', ''Noun'', and ''Verb'', we can generate 108 (= 2 * 3 * 3 * 2 * 3) different grammatical sentences.
    
==Chomsky hierarchy==
 
==Chomsky hierarchy==
Line 58: Line 68:  
| title = The Chomsky Hierarchy
 
| title = The Chomsky Hierarchy
 
| accessdate = 2012-04-06}}
 
| accessdate = 2012-04-06}}
−
</ref>
  −
<ref>{{cite web
  −
| url = http://www.cs.princeton.edu/~rywang/99f126/slides/16th.pdf
  −
| title = Lecture notes: Formal Languages
  −
| accessdate = 2012-04-07}}
   
</ref>
 
</ref>
   Line 78: Line 83:  
==References==
 
==References==
 
<references/>
 
<references/>
 +
 +
[[category:linguistics]]
 +
[[Category:Computer Science]]
SkipCaptcha
265

edits