  
  def lemmatize(string, index, exceptions, rules):
      string = string.lower()
      forms = []
      if string in index:
          forms.append(string)
      forms.extend(exceptions.get(string, []))
      for old, new in rules:
          if string.endswith(old):
              form = string[:len(string) - len(old)] + new
              if form in index or not form.isalpha():
 
</s> remove     def punct(self, string):
        return self(string, 'punct')
 </s> add     def adj(self, string, **morphology):
        return self(string, 'adj', **morphology)

    def punct(self, string, **morphology):
        return self(string, 'punct', **morphology) </s> remove     def __call__(self, string, pos):
 </s> add     def __call__(self, string, pos, **morphology): </s> remove     def noun(self, string):
        return self(string, 'noun')
 </s> add     def is_base_form(self, pos, **morphology):
        '''Check whether we're dealing with an uninflected paradigm, so we can
        avoid lemmatization entirely.'''
        if pos == 'noun' and morphology.get('number') == 'sing' and len(morphology) == 1:
            return True
        elif pos == 'verb' and morphology.get('verbform') == 'inf' and len(morphology) == 1:
            return True
        else:
            return False </s> remove     def verb(self, string):
        return self(string, 'verb')
 </s> add     def noun(self, string, **morphology):
        return self(string, 'noun', **morphology)
    # TODO: Is this correct? See discussion in Issue #435.
    #if string in index:
    #    forms.append(string)
  
  def lemmatize(string, index, exceptions, rules):
      string = string.lower()
      forms = []
    # TODO: Is this correct? See discussion in Issue #435.
    #if string in index:
    #    forms.append(string)
    # TODO: Is this correct? See discussion in Issue #435.
    #if string in index:
    #    forms.append(string)
      forms.extend(exceptions.get(string, []))
      for old, new in rules:
          if string.endswith(old):
              form = string[:len(string) - len(old)] + new
              if form in index or not form.isalpha():
keep keep keep keep replace replace keep keep keep keep keep
 Pass lemmatizer morphological features, so that rules are sensitive to base/inflected distinction, which is how the WordNet data is designed. See Issue #435 
spacy/lemmatizer.py