Search code examples
nlpstanford-nlpcnf

How can I convert PCFG in CNF for this grammar?


Given the following probabilistic context-free grammar -

1.NP -> ADJ N [0.6]
2.NP -> N     [0.4] 
3.N  -> cat   [0.2] 
4.N  -> dog   [0.8]

what will be the CNF??


Solution

  • Given PCFG in CNF is given below.

    1.NP -> ADJ N [0.6]
    2.NP -> cat   [0.08] 
    3.NP -> dog   [0.32] 
    

    Because you need to get the same probability for the result by applying both the original and the converted set of rules (in CNF).