szaydel

szaydel / WordCountHistogram / 0.1.0

README.md

Overview

A very simple, naive word counting function. Give it a string and it will give back a map with count of each unique word.

Usage

Input

There is only a single input into this simple word counting function, and that is a basic string, which is assumed to be a sentence, a paragraph, etc.

ParameterDescription
textA string which consists of some number of English words.

Output

Result maps each word to number of times it occurred in the input.

ParameterDescription
resultA histogram in the form of a dictionary, or a hash table with words mapped to count.

Examples

{
    "text": "Some number of words"
}