castigate vs throw the book at

castigate

verb
  • To punish or reprimand someone severely. 

  • To revise or make corrections to a publication. 

  • To execrate or condemn something in a harsh manner, especially by public criticism. 

throw the book at

verb
  • To apply the harshest possible punishment to. 

  • To charge with or convict of as many crimes as possible. 

  • Used other than figuratively or idiomatically: see throw, the, book, at. 

How often have the words castigate and throw the book at occurred in a corpus of books? (source: Google Ngram Viewer )