hmm and pcfg generation model