concept word in category algorithms

This is an excerpt from Manning's book Algorithms and Data Structures in Action.
[2] In modern architectures/languages, it is possible that an array element corresponds to a word of memory rather than a byte, but for the sake of simplicity let’s just assume an array of char is stored as an array of bytes.
Figure 4.4 Checking if an entry is in a Bloom filter, step by step.
(A) We start with the email we would like to check, “duffy@acme.com”.
(B) The key (our email) is processed through our set of hash functions: in our example we assume k=3, so we’ll have 3 different hash functions, H0, H1 and H2.
(C) Each hash function produces an index for our binary array: in this case the three indices might be, for instance, <9, 6, 2>.
(D) We access the elements of the binary array at those indices.
(E) The first element, at index 2, is 0. The other bits are 0 and 1 respectively.
(F) Since not all the bits we checked were equals to 1, it means that “duffy@acme.com”.is not stored in the Bloom filter, and we will return false.
The same workflow is followed for “roger@acme.com”, on the right: because all three bits checked are set to 1, we return true: this means that “roger@acme.com” might have been stored in the Bloom filter, with a certain degree of confidence.![]()

This is an excerpt from Manning's book Algorithms and Data Structures for Massive Datasets.
Figure 2.1: Where hashing pops up in e-mail communication: to log into your email account, the password you type in is hashed to check against the database of stored hashes of existing passwords. While writing an email, the spellchecker hashes words to check against the database of hashes of dictionary words; when the email is sent, it is separated into packets, each of which has a hashed destination IP address on it. Lastly, some spam filters use hashing to classify the incoming emails.
![]()
Where Prob(A) denotes the probability of occurrence of A, that is, the number of occurrences of A in corpus divided by the total number of words in the corpus. The intuition behind this formula is that it measures how likely A and B are to occur close to each other in our corpus (enumerator) in comparison to how often they would co-occur if they were independent (denominator). The higher the PMI, the more similar the words are. Typically, to compute the PMIs for all word-context pairs or the particular word-context pairs of interest, we would preprocess the corpus to produce the following type of matrix:
Figure 4.6: To preprocess the text corpus for computing PMI, one way is to create a matrix M where the entry M[A][B] contains the number of times the word A appears in the context B. So for example, ‘kayak’ appears 3 times in the context of ‘water’ and 0 times in the context of ‘furniture’. We also produce the additional count for each word (the last column of the matrix), and count for each context (the last row in the matrix), as well as the total number of words (lower right corner).
![]()
For better association scores between the words, the more text we use, the better, but with the larger corpus, even if the number of distinct words is fairly reasonable in size, the number of word-context pairs quickly gets out of hand.