#C14879. Word Frequency Counter
Word Frequency Counter
Word Frequency Counter
Given a sentence, count the frequency of each unique word while ignoring punctuation and case sensitivity. The output should be a JSON object where each key is a word and its corresponding value is the number of occurrences. The words in the JSON object must be sorted in lexicographical order.
For example, if the input is "Hello, hello! How are you?", then after removing punctuation and converting to lowercase, the counts will be: "are": 1, "hello": 1, "how": 1, "you": 1, which should be printed as {"are":1,"hello":1,"how":1,"you":1}.
inputFormat
The input consists of a single line containing a sentence. The sentence may include letters, digits, spaces, punctuation marks, and other special characters.
outputFormat
Output a JSON object that represents the frequency count of each word. All words must be transformed to lowercase and punctuation removed. The keys in the JSON object must be sorted in lexicographical order. Make sure that the output is printed exactly to stdout.
## sampleHello
{"hello":1}