#C12002. Unique Word Counter
Unique Word Counter
Unique Word Counter
You are given a string that may contain multiple lines, punctuation, and a mix of uppercase and lowercase letters. Your task is to count the number of unique words in the string. A word is a sequence of alphanumeric characters separated by whitespace.
The comparison should be case-insensitive and all punctuation should be ignored. For instance, the string Hello, world! Hello.
has 2 unique words: hello and world.
Note: If the input is empty, the answer should be 0.
You can use the following formula to understand the transformation:
\(\text{UniqueCount} = \left| \left\{ \text{word} : \text{word} \in \text{split}(\text{lowercase}(\text{removePunct}(S))) \right\} \right|\)
inputFormat
The input is provided via stdin and consists of a single string that may span multiple lines. This string can include letters, numbers, spaces, and punctuation marks.
outputFormat
Output a single integer to stdout representing the number of unique words in the provided string.
## sample
0