#NEWLINE# def test_get_features_two_words( self ) : #NEWLINE# #INDENT# obj = { #NEWLINE# #INDENT# 'token' : 'hits' , #NEWLINE# 'index' : 2 , #NEWLINE# 'target' : [ 'a' , 'boy' , 'hits' , 'a' , 'dog' ] , #NEWLINE# 'source' : [ 'un' , 'garcon' , 'frappe' , 'un' , 'chien' ] , #NEWLINE# 'target_pos' : [ 'DT' , 'NN' , 'VBZ' , 'DT' , 'NN' ] , #NEWLINE# 'source_pos' : [ 'DT' , 'NN' , 'VBZ' , 'DT' , 'NN' ] , #NEWLINE# 'alignments' : [ [ 0 ] , [ 1 ] , [ 3 ] , [ 2 ] , [ 4 ] ] , #NEWLINE# #UNINDENT# } #NEWLINE# extractor = TargetTokenFeatureExtractor ( context_size = 2 ) #NEWLINE# [ token , left , right ] = extractor . get_features ( obj ) #NEWLINE# self . assertEqual ( token , 'hits' ) #NEWLINE# self . assertEqual ( left , 'a boy' ) #NEWLINE# self . assertEqual ( right , 'a dog' )