Generalize binary dictionary