Qt-implementation of language detection algorithm