kyu_4.most_frequently_used_words package

Submodules

kyu_4.most_frequently_used_words.solution module

Most frequently used words in a text.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_4.most_frequently_used_words.solution.top_3_words(text: str) list[source]

Top 3 words function.

Given a string of text (possibly with punctuation and line-breaks), returns an array of the top-3 most occurring words, in descending order of the number of occurrences.

Parameters:

text – a string of text

Returns:

an array of the top-3 most occurring words

kyu_4.most_frequently_used_words.test_top_3_words module

Test for ‘Most frequently used words in a text’.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_4.most_frequently_used_words.test_top_3_words.Top3WordsTestCase(methodName='runTest')[source]

Bases: TestCase

Testing top_3_words.

_classSetupFailed = False
_class_cleanups = []
test_top_3_words()[source]

Test top_3_words function with various test data.

Returns:

Module contents

Most frequently used words in a text package.