annotate by similarity

Scripts to implement annotation by similarity.