Book analysis code