code: def stemmer_middle_high_german(text_l, rem_umlauts = True, exceptions = exc_dict):
  	
  	
  	#Normalize text
  	text_l = normalize_middle_high_german(text_l, to_lower_all = False, to_lower_beginning = True)
  	
  	#Tokenize text
  	word_tokenizer = WordTokenizer("middle_high_german")
  	text_l = word_tokenizer.tokenize(text_l)
  	text = []
  
  	
  	for word in text_l:
  		try:
  			text.append(exceptions[word]) #test if word in exception dictionary
  			
  		except:
  			if word[0].isupper():
  				#MHG only uses upper case for locations, people, etc. So any word that starts with a capital
  				#letter while not being at the start of a sentence will automatically be excluded.
  				text.append(word)
  				
  			elif word in MHG_STOPS: 
  				text.append(word) #Filter stop words
  				
  			else:
  				text.append(stem_helper(word, rem_umlaut = rem_umlauts))
  	return text
docs: text_l: text in string format
  	   rem_umlauts: choose whether to remove umlauts from string
  	   exceptions: hard-coded dictionary for the cases the algorithm fails