1. A method comprising: obtaining, by a processor in a device, a data segment from a data set, wherein the data segment is a subset of the data set; applying a hash function to the data segment; storing, by the processor, a result of the hash function as a hash index value, wherein the hash index value is used to generate a vocabulary word in a codebook; reducing the number of hash index values in the stored codebook, reducing the number of hash index values comprising: combining the hash index value and an additional hash index value into a hash conjunction by executing outer product algorithms on the hash index values, the hash conjunction used as the vocabulary word in the codebook.