nltk.StackDecoder.valid_phrases¶
-
static
StackDecoder.
valid_phrases
(all_phrases_from, hypothesis)[source]¶ Extract phrases from
all_phrases_from
that contains words that have not been translated byhypothesis
Parameters: all_phrases_from (list(list(int))) – Phrases represented by their spans, in the same format as the return value of find_all_src_phrases
Returns: A list of phrases, represented by their spans, that cover untranslated positions. Return type: list(tuple(int, int))