Programm displays top 10 most frequent words and their frequency. Programm works only with 'windows-1251' encoding.
Programm takes one argument: path to file.
Example of script launch on Windows, Python 3.5:
$ python lang_frequency.py <path to file>
Example of programm output:
# Analysed text - War and Peace/Tolstoy
Top ten most frequent words in text:
"и". freq.: 13711
"в". freq.: 6455
"не". freq.: 5660
"что". freq.: 4662
"на". freq.: 3936
"с". freq.: 3782
"он". freq.: 3762
"как". freq.: 2588
"его". freq.: 2508
"к". freq.: 2194
The code is written for educational purposes. Training course for web-developers - DEVMAN.org