Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active May 22, 2025 13:50
Show Gist options
  • Save trikitrok/366f09c5c0a834836ce8e733eacc3678 to your computer and use it in GitHub Desktop.
Save trikitrok/366f09c5c0a834836ce8e733eacc3678 to your computer and use it in GitHub Desktop.

Modified Text Processing kata

As a developer that writes blog posts I want a tool that helps me to understand better the text I am writing. For that I need a way to know the following:

  1. What are the most common words used in the text?

  2. How many characters does the text have?

Passing a text through the command line the programa should show the results on the console.

Iteration 1.

  • Count the words in the text.

Iteration 2.

  • Rank the words from most used to less used.

Iteration 3.

  • Show the frequency of each word.

Iteration 4.

  • Indicate the maximum number of words to show. Use the parameter --max: analyze Hello, this is an example --max=2

Iteration 5.

  • Don't show infrequent words. Indicate the minimum frequency to show using the minfreq parameter (hint use --minfreq=3).

Iteration 6.

  • Don't show some words using the noshow parameter (hint use --noshow=[return constructor readonly class private public]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment