#NEWLINE# def test_future_score( self ) : #NEWLINE# #INDENT# hypothesis = _Hypothesis ( ) #NEWLINE# hypothesis . untranslated_spans = ( lambda _ : [ ( 0 , 2 ) , ( 5 , 8 ) ] ) #NEWLINE# future_score_table = defaultdict ( ( lambda : defaultdict ( float ) ) ) #NEWLINE# future_score_table [ 0 ] [ 2 ] = 0.4 #NEWLINE# future_score_table [ 5 ] [ 8 ] = 0.5 #NEWLINE# stack_decoder = StackDecoder ( None , None ) #NEWLINE# future_score = stack_decoder . future_score ( hypothesis , future_score_table , 8 ) #NEWLINE# self . assertEqual ( future_score , ( 0.4 + 0.5 ) )