nltk.translate.trace¶
- nltk.translate.trace(backlinks, source_sents_lens, target_sents_lens)[source]¶
Traverse the alignment cost from the tracebacks and retrieves appropriate sentence pairs.
- Parameters
backlinks (dict) – A dictionary where the key is the alignment points and value is the cost (referencing the LanguageIndependent.PRIORS)
source_sents_lens (list(int)) – A list of target sentences’ lengths
target_sents_lens (list(int)) – A list of target sentences’ lengths