computing the word frequency + ILP