          self.adj_id = adj_id
          self.index = {}
          self.exc = {}
          for pos in ['adj', 'adv', 'noun', 'verb']:
              self.index[pos] = read_index(path.join(wn_dict_dir, 'index.%s' % pos))
              self.exc[pos] = read_exc(path.join(wn_dict_dir, '%s.exc' % pos))
  
      def __call__(self, string, pos):
  
          return lemmatize(string, self.index[pos], self.exc[pos], self.rules[pos])
          if pos == self.noun_id:
 
</s> remove     def __call__(self, string, pos):
 </s> add     def __init__(self, index, exceptions, rules):
        self.index = index
        self.exc = exceptions
        self.rules = rules </s> remove     def __init__(self, wn_dict_dir, noun_id, verb_id, adj_id):
        self.noun_id = noun_id
        self.verb_id = verb_id
        self.adj_id = adj_id
        self.index = {}
        self.exc = {}
 </s> add     @classmethod
    def from_dir(cls, data_dir):
        index = {}
        exc = {} </s> remove         return lemmatize(string, self.index[pos], self.exc[pos], self.rules[pos])
        if pos == self.noun_id:
            return self.noun(string)
        elif pos == self.verb_id:
            return self.verb(string)
        elif pos == self.adj_id:
            return self.adj(string)
 </s> add     def __call__(self, string, pos):
        if pos == NOUN:
            pos = 'noun'
        elif pos == VERB:
            pos = 'verb'
        elif pos == ADJ:
            pos = 'adj' </s> remove             raise Exception("Cannot lemmatize with unknown pos: %s" % pos)
 </s> add             return string
        lemmas = lemmatize(string, self.index[pos], self.exc[pos], self.rules[pos])
        return min(lemmas)
            index[pos] = read_index(path.join(data_dir, 'index.%s' % pos))
            exc[pos] = read_exc(path.join(data_dir, '%s.exc' % pos))
        rules = json.load(open(path.join(data_dir, 'lemma_rules.json')))
        return cls(index, exc, rules)
          self.adj_id = adj_id
          self.index = {}
          self.exc = {}
          for pos in ['adj', 'adv', 'noun', 'verb']:
            index[pos] = read_index(path.join(data_dir, 'index.%s' % pos))
            exc[pos] = read_exc(path.join(data_dir, '%s.exc' % pos))
        rules = json.load(open(path.join(data_dir, 'lemma_rules.json')))
        return cls(index, exc, rules)
            index[pos] = read_index(path.join(data_dir, 'index.%s' % pos))
            exc[pos] = read_exc(path.join(data_dir, '%s.exc' % pos))
        rules = json.load(open(path.join(data_dir, 'lemma_rules.json')))
        return cls(index, exc, rules)
  
      def __call__(self, string, pos):
  
          return lemmatize(string, self.index[pos], self.exc[pos], self.rules[pos])
          if pos == self.noun_id:
keep keep keep keep replace replace keep keep keep keep keep
 * Tagger training now working. Still need to test load/save of model. Morphology still broken. 
spacy/lemmatizer.py