KeyError on If-Condition in dictionary Python
What you were trying to do was
if temp_tuple in bigramdict:
instead of
if bigramdict[temp_tuple] in bigramdict:
What you were trying to do was
if temp_tuple in bigramdict:
instead of
if bigramdict[temp_tuple] in bigramdict: