Glassdoor may need quick word-frequency summaries for a piece of review text. Given a text string and a list of target words, return how many times each target appears as a complete word.
Matching is case-insensitive. Treat any consecutive sequence of English letters or digits as one word, so punctuation separates words. Return a dictionary whose keys are the distinct target words in lowercase. A target that does not appear must still be included with count 0.
Implement count_word_occurrences(text, words).
text is a string.words is a list of strings, where each target contains only English letters and digits.text.job does not match jobs.def count_word_occurrences(text, words):