old_contents: # -*- coding: utf-8 -*-
  import unicodedata
  
  
  def lower_text(text):
      return text.lower()
  
  
  def normalize_unicode(text, form='NFKC'):
      normalized_text = unicodedata.normalize(form, text)
      return normalized_text
  
new_contents: # -*- coding: utf-8 -*-
  import unicodedata
  
  import nltk
  from nltk.corpus import wordnet
  
  
  def lower_text(text):
      return text.lower()
  
  
  def normalize_unicode(text, form='NFKC'):
      normalized_text = unicodedata.normalize(form, text)
      return normalized_text
  
  
  def lemmatize_term(term, pos=None):
      if pos is None:
          synsets = wordnet.synsets(term)
          if not synsets:
              return term
          pos = synsets[0].pos()
          if pos == wordnet.ADJ_SAT:
              pos = wordnet.ADJ
      return nltk.WordNetLemmatizer().lemmatize(term, pos=pos)
  
subject: add lemmatizer