forked from p46318075/CodePattern
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
429 B
16 lines
429 B
import cppy.cp_util as util
|
|
|
|
|
|
def extract_words(path_to_file:str) -> list:
|
|
return util.extract_file_words(path_to_file)
|
|
|
|
def frequencies( word_list:list ) -> dict :
|
|
return util.get_frequencies(word_list)
|
|
|
|
def sort(word_freq:dict) -> list :
|
|
return util.sort_dict(word_freq)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
word_freqs = sort( frequencies(extract_words( util.testfilepath )) )
|
|
util.print_word_freqs(word_freqs) |