Probabilistic Context Free Grammar How to calculate the probability of a sentence given the probabilities of various parse trees in PCFG
Probability of a sentence:
Probability of a
sentence is the sum of probabilities of all parse trees that can be derived
from the sentence under PCFG;
Example:
Probability of tree t1
= 1.0 * 0.1 * 0.7 * 1.0 * 0.4
* 0.18 * 1.0 * 1.0 * 0.18
= 0.0009072
Probability of tree t2
P(t2)
= 1.0 * 0.1 * 0.3 * 0.7 * 1.0 * 0.18 *
1.0 * 1.0 * 0.18
=
0.0006804
Probability
of the sentence:
Probability of the
sentence “astronomers saw the stars with ears”;
Which
is the most probable tree?
The probability of
the parse tree t1 is greater than the probability of parse tree t2.
Hence, t1 is the more probable of the two parses.
********************
Related links:
- Go to Natural Language Processing (NLP) home
- Go to NLP Solved Exercise page
- Go to Context Free Grammar (CFG) Formal Definition page
- Go to How to derive production rule probability from Treebank using MLE - Solved exercise page
No comments:
Post a Comment