Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ### Requirements: python 3.7 interpreter
  2. This python program reads the words from the input file: `data.txt`, count the frequencies of all the words and prints the words and their frequencies in an output program `result.txt`.
  3. #### What can be done further to run in production:
  4. - add stem words i.e. such as making singular and plurals the same word (computer = computers)
  5. - to optimize the algorithm, we can create a max heap of frequencies as they are counted, and then sort them using heapsort and return the result. This will improve the runtime of the algorithm.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement