def _make_comparative(adj: str) -> str:
  """"Heuristic function to build comparative adjectives."""
  if adj[-1] == 'y':
    return f'{adj[:-1]}ier'
  if adj[-1] == 'e':
    return f'{adj}r'
  if re.search('[b-df-hj-np-tv-xz][aeiyou][b-df-hj-np-tvxz]$', adj):
    return f'{adj}{adj[-1]}er'
  return f'{adj}er'
"Heuristic function to build comparative adjectives.
language/wino_dict/utils.py