Utilities used by the language detection methods.