1. A computer-implemented method comprising: accessing, at a computing device including a processor, a translation hypergraph that represents a plurality of candidate translations, the translation hypergraph including a plurality of paths including nodes connected by edges; calculating, at the computing device, first posterior probabilities for each edge in the translation hypergraph; calculating, at the computing device, second posterior probabilities for each n-gram represented in the translation hypergraph based on the first posterior probabilities; and performing, at the computing device, decoding on the translation hypergraph using the second posterior probabilities to convert a sample text from a first language to a second language, where calculating the second posterior probabilities includes calculating: P ⁡ ( w | Ψ ) = ∑ E ∈ Ψ ⁢ ∑ e ∈ E ⁢ f ⁡ ( e , w , E ) ⁢ P ⁡ ( E | F ) , where P(w|Ψ) is the posterior probability of the n-gram w in the translation hypergraph; Ψ is a space defined by the translation hypergraph; E is a candidate translation; F is the sample text in the first language, e is an edge; and f(e,w,E)=1 when Wεe, P(e|Ψ)>P(e′|Ψ), and e′ is an edge that precedes e on E; otherwise, f(e,w,E)=0.