# How to select a good scale for letter frequency in a text?

I needed to use a scale in a code to determine which sentence in a file has been encrypted by a single-character key.

The scale that i currently used is: +2 for every occurrence of a vowel or a space and +1 for other alphabets, numbers and some characters. The sentence with the maximum value using above scale helped me in finding the solution.

Is there some standard scale used by cryptographers based on character frequency?

Thus, I'd suggest starting with something simple, like the total variation distance, which can be calculated simply by taking the difference between the observed and the expected frequency of each letter and summing their absolute values together, or the $\chi^2$-divergence, for which you need to sum the squares of the differences between the observed and the expected frequencies, divided by the expected frequency.
The full formulas also involve some constant factors that only depend on the message length, but for simple comparison purposes, the raw sums are enough. The $\chi^2$ distance is particularly useful if you need to estimate the absolute likelihood of a message being generated according to some given (e.g. uniformly random) distribution, although this requires some additional steps that are not needed for simple ranking by relative likelihood.