      lang = 'zh'
      Defaults = ChineseDefaults  # override defaults
  
      def make_doc(self, text):
          try:
              import jieba
          except ImportError:
              raise ImportError("The Chinese tokenizer requires the Jieba library: "
                                "https://github.com/fxsjy/jieba")
          words = list(jieba.cut(text, cut_all=False))
          words = [x for x in words if x]
          return Doc(self.vocab, words=words, spaces=[False]*len(words))
  
  
  __all__ = ['Chinese']
 
</s> remove         self.cand_to_gold = align([t.orth_ for t in doc], words)
        self.gold_to_cand = align(words, [t.orth_ for t in doc])
 </s> add         # This needs to be done before we align the words
        if make_projective and heads is not None and deps is not None:
            heads, deps = nonproj.projectivize(heads, deps)

        # Do many-to-one alignment for misaligned tokens.
        # If we over-segment, we'll have one gold word that covers a sequence
        # of predicted words
        # If we under-segment, we'll have one predicted word that covers a
        # sequence of gold words.
        # If we "mis-segment", we'll have a sequence of predicted words covering
        # a sequence of gold words. That's many-to-many -- we don't do that.
        cost, i2j, j2i, i2j_multi, j2i_multi = align([t.orth_ for t in doc], words)

        self.cand_to_gold = [(j if j >= 0 else None) for j in i2j]
        self.gold_to_cand = [(i if i >= 0 else None) for i in j2i] </s> remove         return JapaneseTokenizer(cls, nlp)
 </s> add         if cls.use_janome:
            return JapaneseTokenizer(cls, nlp)
        else:
            return JapaneseCharacterSegmenter(cls, nlp.vocab)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
      lang = 'zh'
      Defaults = ChineseDefaults  # override defaults
  
      def make_doc(self, text):
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
        if self.Defaults.use_jieba:
            try:
                import jieba
            except ImportError:
                msg = ("Jieba not installed. Either set Chinese.use_jieba = False, "
                       "or install it https://github.com/fxsjy/jieba")
                raise ImportError(msg)
            words = list(jieba.cut(text, cut_all=False))
            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False]*len(words))
        else:
            words = []
            spaces = []
            doc = self.tokenizer(text)
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False]*len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)
  
  
  __all__ = ['Chinese']
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep
 Revert "Merge branch 'develop' of https://github.com/explosion/spaCy into develop"

This reverts commit c9ba3d3c2dc7067cf8bd55f878cec45a8c6d73d4, reversing
changes made to 92c26a35d425d4e8ca1b805ea776ea10f5ded3df. 
spacy/lang/zh/__init__.py