上QQ阅读APP看书,第一时间看更新
Approach to handle syntactic ambiguity
To handle this ambiguity, we need to use statistical approaches and get the most likelihood ratio. We need to take co-occurrences between the verb and the preposition in one hand, and preposition and the noun on other hand, and then calculate the log-likelihood ratio by using following equation:
Figure 3.14: Log-likelihood ratio
Here, p(p/v) is the probability of seeing a PP with preposition p and after verb v.
And p(p/n) is the probability of seeing a PP with preposition p after noun n.
If F(v,p,n) < 0, then we need to attach the preposition to the noun, and if F(v,p,n) >0, then we need to attach preposition to the verb. We will see the implementation in Chapter 5, Feature Engineering and NLP Algorithms.