Similar Items: Generalized Function-Correcting Partition Codes