|
Phrase- structure Rules |
  |
Good things:
|
|---|---|---|
|
Grammar Modification |
  |
Adverb data:
How can we modify our little set of phrase-structure rules to account for these facts?
|
| Lexicon |   |
For our purposes now, we need rules that introduce words
|
|
Derivation (not parsing) |
  |
Some trees obey the rules of our grammar, some do not.
A derivation is a little step by step proof or demonstration
that a particular tree obeys the rules of the grammar.
That portion of the derivation is completed or terminated when a word is used; hence terminal node. Context Free grammars are an important part of our Theory of Computation, in the sense of Marr. Derivations are just a procedure for veriyfing that something is in grammar or out; they are NOT an algorithm or progarm for parsing. In particular, we don't know how to assign a permissible structure to a new sentence. That's parsing . |
|
Finite- State Grammars |
  |
Restrict rules so that non-terminals must occur at the beginning or at the end of a rule. Then we have a Finite-State Grammar. Finite-state grammars can be parsed using a particularly simple kind of computational model called finite-state automaton. These are more restricted than cointext-free grammars, hence a proper subset of tehm. They are easier to process and to parse. We'll come back to them later. |
|
Top-Down Parsing |
  |
Think of this as an algorithm that takes one particular view of how to do a derivation. Suppose we are trying to parse the senternce Richard M. Nixon likes John:
|
This is top-down parsing, in the simplest form.
|
Bottum-up PArsing |
  |
|
| Parser states |   |
First we add positions to our representation of the input.
A parser state is the current goal of the computation. It consists of two pieces of information:
We start in the following state:
|
| Step | Curr. State |
Backup States |
Rewrite/ Found |
|---|---|---|---|
| 1. | ((S) 1) |   | initial position |
| 2. | ((NP VP) 1) | ((VP) 1) | S -> NP VP |
| 3. | ((Art N VP) 1) |
((Art Adj N VP) 1) ((ProperName VP) 1) ((VP) 1) |
NP -> Art N (current state) NP -> Art Adj N (backup state) NP -> ProperName (backup state) |
| 4. | ((Art Adj N VP) 1) |
((ProperName VP) 1) ((VP) 1) |
Backing up!! "John" is not an Art |
| 5. | ((ProperName VP) 1) | ((VP) 1) |
Backing up!! "John" is not an Art |
| 6. | ((VP) 2) | ((VP) 1) | Found: (John ProperName 1 2) |
| 7. | ((V NP) 2) |
((V PP) 2) ((VP) 1) |
VP -> V NP VP -> V PP |
| 8. | ((NP) 3) |
((V PP) 2) ((VP) 1) |
Found: (likes V 2 3) |
| 9. | ((Art N) 3) |
((Art Adj N VP) 3) ((ProperName VP) 3) ((V PP) 2) ((VP) 1) |
NP -> Art N (current state) NP -> Art Adj N (backup state) NP -> ProperName (backup state) |
| 10. | ((Art Adj N VP) 3) |
((ProperName VP) 3) ((V PP) 2) ((VP) 1) |
Backing up!! "Richard" is not an Art |
| 11. | ((ProperName VP) 3) |
((V PP) 2) ((VP) 1) |
Backing up!! "Richard" is not an Art |
| 12. | ((ProperName VP) 3) |
((V PP) 2) ((VP) 1) |
Backing up!! "Richard" is not an Art |
| 13. | (6) |
((V PP) 2) ((VP) 1) |
Found: ("Richard M. Nixon" ProperName 3 6) Done!! |
| 14. | ((V PP) 2) | ((VP) 1) |
Backing up!! Keep looking for more !! |
| 15. | ((PP) 3) | ((VP) 1) | Found: (V likes 2 3) |
| 15. | ((P NP) 3) | ((VP) 1) | PP -> P NP |
| 16. | (VP 1) |   | Backing up !! |