implement phrase_prob