code: def tokenize_akkadian_words(line):
      
      beginning_underscore = "_[^_]+(?!_)$"
      # only match a string if it has a beginning underscore anywhere
      ending_underscore = "^(?<!_)[^_]+_"
      # only match a string if it has an ending underscore anywhere
      two_underscores = "_[^_]+_"
      # only match a string if it has two underscores
  
      words = line.split()
      # split the line on spaces ignoring the first split (which is the
      # line number)
      language = "akkadian"
      output_words = []
      for word in words:
          if re.search(two_underscores, word):
              # If the string has two underscores in it then the word is
              # in Sumerian while the neighboring words are in Akkadian.
              output_words.append((word, "sumerian"))
          elif re.search(beginning_underscore, word):
              # If the word has an initial underscore somewhere
              # but no other underscores than we're starting a block
              # of Sumerian.
              language = "sumerian"
              output_words.append((word, language))
          elif re.search(ending_underscore, word):
              # If the word has an ending underscore somewhere
              # but not other underscores than we're ending a block
              # of Sumerian.
              output_words.append((word, language))
              language = "akkadian"
          else:
              # If there are no underscore than we are continuing
              # whatever language we're currently in.
              output_words.append((word, language))
      return output_words
docs: Operates on a single line of text, returns all words in the line as a
      tuple in a list.
  
      input: "1. isz-pur-ram a-na"
      output: [("isz-pur-ram", "akkadian"), ("a-na", "akkadian")]
  
      :param: line: text string
      :return: list of tuples: (word, language)