Write a Python function that takes a string as input and returns a dictionary where the keys are unique words in the string, and the values are the frequencies of each word. The function should be case-insensitive and should ignore punctuation.
For example:
The expected output should be something like:
Provide a concise and efficient Python code solution along with any explanations or considerations. Thank you!
For example:
Python:
def word_frequency_analysis(text):
# Your code goes here
pass
# Test the function
sample_text = "Python is a powerful, versatile programming language. Python is widely used for web development, data analysis, artificial intelligence, and more."
result = word_frequency_analysis(sample_text)
print(result)
The expected output should be something like:
Python:
{
'python': 2,
'is': 2,
'a': 1,
'powerful': 1,
'versatile': 1,
'programming': 1,
'language': 1,
'widely': 1,
'used': 1,
'for': 1,
'web': 1,
'development': 1,
'data': 1,
'analysis': 1,
'artificial': 1,
'intelligence': 1,
'and': 1,
'more': 1
}
Provide a concise and efficient Python code solution along with any explanations or considerations. Thank you!