Work with bookid and wordids directly, not tokens