input: Write a function to calculate word probabilities in a given text.
  assert calculate_word_probabilities("cat in the hat. the cat in the hat.", ["cat", "hat"]) == {'cat': 0.5, 'hat': 0.5}
  assert calculate_word_probabilities("hello world. hello.", ["hello", "world"]) == {'hello': 1.0, 'world': 0.5}
  assert calculate_word_probabilities("one fish two fish. red fish blue fish.", ["fish", "blue"]) == {'fish': 1.0, 'blue': 0.25}
output: def calculate_word_probabilities(text, words):
      from collections import Counter
      import re
      
      # Normalize the text to lowercase and remove non-alphabetical characters
      words_list = re.findall(r'\b\w+\b', text.lower())
      
      # Count occurrences of each word
      word_counts = Counter(words_list)
      
      # Total number of words in the text
      total_words = len(words_list)
      
      # Calculate probabilities for specified words
      probabilities = {word: word_counts[word] / total_words for word in words}
      
      return probabilities