  
      def end_training(self, data_dir=None):
          if data_dir is None:
              data_dir = self.data_dir
          self.parser.model.end_training()
          self.entity.model.end_training()
          self.tagger.model.end_training()
          self.vocab.strings.dump(path.join(data_dir, 'vocab', 'strings.txt'))
  
          with open(path.join(data_dir, 'vocab', 'serializer.json'), 'w') as file_:
              file_.write(
                  json.dumps([
 
</s> remove     def default_matcher(cls, vocab, data_dir=None):
        if data_dir is None:
            data_dir = cls.default_data_dir()
        return Matcher.from_dir(data_dir, vocab)
 </s> add     def default_matcher(cls, vocab, data_dir):
        if path.exists(data_dir):
            return Matcher.from_dir(data_dir, vocab)
        else:
            return None </s> remove     def end_training(self):
 </s> add     def end_training(self, model_loc=None):
        if model_loc is None:
            model_loc = self.model_loc </s> remove         golds = [self.tag_names.index(g) if g is not None else -1
                 for g in gold_tag_strs]
 </s> add         golds = [self.tag_names.index(g) if g is not None else -1 for g in gold_tag_strs] </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'
        self.parser.model.end_training(path.join(data_dir, 'deps', 'model'))
        self.entity.model.end_training(path.join(data_dir, 'ner', 'model'))
        self.tagger.model.end_training(path.join(data_dir, 'pos', 'model'))
  
      def end_training(self, data_dir=None):
          if data_dir is None:
              data_dir = self.data_dir
        self.parser.model.end_training(path.join(data_dir, 'deps', 'model'))
        self.entity.model.end_training(path.join(data_dir, 'ner', 'model'))
        self.tagger.model.end_training(path.join(data_dir, 'pos', 'model'))
        self.parser.model.end_training(path.join(data_dir, 'deps', 'model'))
        self.entity.model.end_training(path.join(data_dir, 'ner', 'model'))
        self.tagger.model.end_training(path.join(data_dir, 'pos', 'model'))
        self.parser.model.end_training(path.join(data_dir, 'deps', 'model'))
        self.entity.model.end_training(path.join(data_dir, 'ner', 'model'))
        self.tagger.model.end_training(path.join(data_dir, 'pos', 'model'))
          self.vocab.strings.dump(path.join(data_dir, 'vocab', 'strings.txt'))
  
          with open(path.join(data_dir, 'vocab', 'serializer.json'), 'w') as file_:
              file_.write(
                  json.dumps([
keep keep keep keep replace replace replace keep keep keep keep keep
 * Tagger training now working. Still need to test load/save of model. Morphology still broken. 
spacy/language.py