Another programming challenge from work to solve Ceaser ciphered sentences and return the correct shift value. Automatic solving of the cypher is easy enough but the hard part comes to automatically detecting if the resulting shifted sentence is English. I have posted before about detecting English using ngrams and used a similar process here.

Here is the code which contains the four test cases.