Java code for mapping genres at the page level in a large collection. Originally based on pagelevelHMM.