The obvious way is merely removing duplicates.
on the assumption that log p(t) log p(t ) for all t ∈ T B and t / ∈ T B , Equation (1) implies that marginalization over the final beam outputs can provide better approximation: reranking after summing out the probability of duplicates can give better ordered list of candidates.