Ravi Annaswamy (7) [Avatar] Offline
I think that the second line of this pair of lines:

left_context = review[max(0,target_i-window):target_i]
right_context = review[target_i+1:min(len(review),target_i+window)]

The right context will only have one word as context.

It should be:
right_context = review[target_i+1:min(len(review),target_i+1+window)]

That is the ending index has to be target_i+1+window (and not target_i+window)

The result may only improve slightly between one word and two-word right context, but wanted to state the correction.