code: def stem(
      word: str,
      exceptions: Dict[str, str] = dict(),
      rem_umlauts: bool = True,
  ) -> str:
      """
      Stem a Middle High German word.
  
      rem_umlauts: choose whether to remove umlauts from string
      exceptions: hard-coded dictionary for the cases the algorithm fails
  
      >>> stem('tagen')
      'tag'
      """
  
      word = normalize_middle_high_german(
          word, to_lower_all=False, to_lower_beginning=True
      )
  
      if word in exceptions:
          return exceptions[word]
  
      if word[0].isupper() is True or word in STOPS:
          return word
  
      return _stem_helper(word, rem_umlaut=rem_umlauts)
  
file_path: cltk/src/cltk/stem/gmh.py
imports: import re
  from typing import Dict
  from cltk.alphabet.gmh import normalize_middle_high_german
  from cltk.stops.gmh import STOPS
  from cltk.tokenizers.gmh import MiddleHighGermanWordTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: stem(word, exceptions, rem_umlauts) and returns: _stem_helper, exceptions, word