input: from typing import List
  
  
  def top_n_frequent_words(text: str, n: int) -> List[str]:
      """ Extract the top 'n' most frequent words from a given text.
      >>> top_n_frequent_words("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", 3)
      [('dolor', 1), ('Lorem', 1), ('ipsum', 1)]
      >>> top_n_frequent_words("The quick brown fox jumps over the lazy dog.", 3)
      [('The', 1), ('quick', 1), ('brown', 1)]
      """
      
      from collections import Counter
  
      # Split the text into individual words
      words = text.split()
  
      # Create a counter object
      counter = Counter(words)
  
      # Get the top 'n' most frequent words
      return counter.most_common(n)
output:     # Remove punctuation and convert words to lowercase
      words = [word.strip(".,!?()[]{}:;\"'").lower() for word in words]
  
      # Create a counter object
      counter = Counter(words)
  
      # Get the top 'n' most frequent words
      return [word for word, count in counter.most_common(n)]