Phrase table implementation