Added generation of word histogram for the document.