nltk.translate.PhraseTable¶
- class nltk.translate.PhraseTable[source]¶
Bases:
object
In-memory store of translations for a given phrase, and the log probability of the those translations
- translations_for(src_phrase)[source]¶
Get the translations for a source language phrase
- Parameters
src_phrase (tuple(str)) – Source language phrase of interest
- Returns
A list of target language phrases that are translations of
src_phrase
, ordered in decreasing order of likelihood. Each list element is a tuple of the target phrase and its log probability.- Return type
list(PhraseTableEntry)