nltk.StackDecoder.find_all_src_phrases¶
-
StackDecoder.
find_all_src_phrases
(src_sentence)[source]¶ Finds all subsequences in src_sentence that have a phrase translation in the translation table
Returns: Subsequences that have a phrase translation, represented as a table of lists of end positions. For example, if result[2] is [5, 6, 9], then there are three phrases starting from position 2 in src_sentence
, ending at positions 5, 6, and 9 exclusive. The list of ending positions are in ascending order.Return type: list(list(int))