I know that n-gram is useful for finding the probability of words,I want to know, How to estimate probabilities of production rules? How many methods or rules to calculate probabilities of production rules?
I could not find any good blog or something on this topic.Now I am studying on probabilistic context free grammar & CKY parsing algorithm.
As I understand your question, you are asking how to estimate the parameters of a PCFG model from data.
In short, it's easy to make empirical production-rule probability estimates when you have ground-truth parses in your training data. If you want to estimate the probability that S -> NP VP
, this is something like Count(S -> NP VP) / Count(S -> *)
, where *
is any possible subtree.
You can find a much more formal statement in lots of places on the web (search for "PCFG estimation" or "PCFG learning"). Here's a nice one from Michael Collins' lecture notes: http://www.cs.columbia.edu/~mcollins/courses/nlp2011/notes/pcfgs.pdf#page=9