Dictionaries and Nearest Neighbor