Artificial Intelligence - Natural Language Processing

26. Consider the PCFG given below:

 S -> A B   0.3
 S -> B C 0.7
 A -> B A 0.4
 A -> a 0.6
 B -> CC 0.7
 B -> b  0.3
 C -> A B 0.3
 C -> a  0.7
Using CKY algorithm for PCFG, find the no. of parse trees for the string "ababa" and the probability score for the most probable tree.

Cancel reply
Cancel reply

27. Consider the PCFG given below:

S -> NP VP 0.6 PropNoun -> DALLAS 0.2
S -> VP 0.4 PropNoun -> ALICE 0.3
NP -> NP PP 0.4 PropNoun -> BOB 0.3
NP -> PropNoun 0.6 PropNoun -> AUSTIN 0.3
VP -> Verb 0.3 Verb -> ADORE 0.5
VP -> Verb NP 0.3 Verb -> SEE 0.5
VP -> VP PP 0.4 Prep -> IN 0.4
PP -> Prep NP 1.0 Prep -> WITH 0.6
 What is the probability of the sentence w1,4 = "SEE BOB IN AUSTIN"?

Cancel reply
Cancel reply

28. What is the equivalent CNF for the PCEG given in the previous question?

S -> NP VP 0.6 NP -> AUSTIN 0.18
S -> ADORE 0.06 VP -> ADORE 0.15
S -> SEE 0.06 VP -> SEE 0.15
S -> Verb NP 0.12 VP -> Verb NP 0.3
S -> VP PP 0.16 VP -> VP PP 0.4
NP -> NP PP 0.4 Verb -> ADORE 0.5
NP -> DALLAS 0.12 Verb -> SEE 0.5
NP -> ALICE 0.12 Prep -> IN 0.4
NP -> BOB 0.18 Prep -> WITH 0.6
PP -> Prep NP 1.0    
2.
S -> NP VP 0.6 NP -> AUSTIN 0.12
S -> ADORE 0.06 VP -> ADORE 0.15
S -> SEE 0.06 VP -> SEE 0.15
S -> Verb NP 0.12 VP -> Verb NP 0.3
S -> VP PP 0.16 VP -> VP PP 0.4
NP -> NP PP 0.4 Verb -> ADORE 0.5
NP -> DALLAS 0.18 Verb -> SEE 0.5
NP -> ALICE 0.18 Prep -> IN 0.4
NP -> BOB 0.12 Prep -> WITH 0.6
PP -> Prep NP 1.0    
3.
S -> NP VP 0.6 VP -> ADORE 0.15
S -> Verb 0.12 VP -> SEE 0.15
S -> Verb NP 0.12 VP -> Verb NP 0.3
S -> VP PP 0.16 VP ->  VP NP 0.4
NP -> NP PP 0.4 Verb -> ADORE 0.5
NP -> DALLAS 0.12 Verb -> SEE 0.5
NP -> ALICE 0.12 Prep -> IN 0.4
NP -> BOB 0.18 Prep -> WITH 0.6
NP -> AUSTIN 0.18    
PP -> Prep NP 1.0    
4.
S -> NP VP 0.6 NP -> AUSTIN 0.18
S -> ADORE 0.06 VP -> ADORE 0.15
S -> SEE 0.06 VP -> SEE 0.15
S -> Verb NP 0.12 VP -> Verb NP 0.3
S -> VP PP 0.16 VP -> VP PP 0.4
NP -> NP PP 0.4 Verb -> ADORE 0.5
NP -> DALLAS 0.12 Verb -> SEE 0.5
NP -> ALICE 0.12 Prep -> IN 0.4
NP -> BOB 0.18 Prep -> WITH 0.6
PropNoun -> DALLAS 0.2 PropNoun -> ALICE 0.2 
PropNoun -> BOB 0.3 PropNoun -> AUSTIN 0.3
PP -> Prep NP 1.0    

Cancel reply
Cancel reply