For each word w d,,i in document d: where α, β, δ are Dirichlet priors and γ is a Beta To decide the topic of a phrase, we can simply take the first (or last) word's topic or the most common topic in the phrase.
topic models (Blei et al., 2003;Griffiths & Steyvers 2004 are a class of statistical models in which documents are expressed as mixtures of topics, where a topic is a probability distribution over words.