input: Write a function to create a natural language processing application in Python that extracts the top 10 most frequent words from a given text. If the given text is empty, return an empty list.
  assert extract_top_words("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")==[('dolor', 1), ('Lorem', 1), ('ipsum', 1), ('amet', 1), ('consectetur', 1), ('adipiscing', 1), ('elit,', 1), ('sed', 1), ('do', 1), ('eiusmod', 1)]
  assert extract_top_words("")==[]
  assert extract_top_words("The quick brown fox jumps over the lazy dog. The dog was not amused.")==[('The', 2), ('dog', 2), ('not', 1), ('amused.', 1), ('lazy', 1), ('the', 1), ('over', 1), ('jumps', 1), ('fox', 1), ('brown', 1)]
  assert extract_top_words("To be or not to be, that is the question.")==[('to', 2), ('be,', 1), ('that', 1), ('the', 1), ('is', 1), ('question.', 1), ('not', 1), ('or', 1), ('To', 1), ('be', 1)]
output: def extract_top_words(text):
      if not text:
          return []
      words = text.split()
      freq = {}
      for word in words:
          if word in freq:
              freq[word] += 1
          else:
              freq[word] = 1
      sorted_words = sorted(freq.items(), key=lambda x: x[1], reverse=True)
      return sorted_words[:10]