BK-tree Java implementation