http://www-csli.stanford.edu/~hinrich/information-retrieval-...
(see page 38 in the pdf for chapter 3)