      )
      assert len(reset_user_dict) == 0
  
  
  def test_extra_spaces(zh_tokenizer_char):
      # note: three spaces after "I"
      tokens = zh_tokenizer_char("I   like cheese.")
      assert tokens[1].orth_ == "  "
 
</s> remove def test_zh_tokenizer_pkuseg_user_dict(zh_tokenizer_pkuseg):
 </s> add def test_zh_tokenizer_pkuseg_user_dict(zh_tokenizer_pkuseg, zh_tokenizer_char): </s> remove         nlp = Chinese(meta={"tokenizer": {"config": {"use_jieba": False}}})
 </s> add         nlp = Chinese() </s> remove     nlp = Chinese(meta={"tokenizer": {"config": {"use_jieba": False}}})
 </s> add     nlp = Chinese() </s> remove         if use_pkuseg:
            msg = (
                "pkuseg not installed. Either set Chinese.use_pkuseg = False, "
                "or " + _PKUSEG_INSTALL_MSG
            )
 </s> add         if segmenter == "pkuseg":
            msg = "pkuseg not installed. To use pkuseg, " + _PKUSEG_INSTALL_MSG
def test_zh_extra_spaces(zh_tokenizer_char):
      )
      assert len(reset_user_dict) == 0
  
  
def test_zh_extra_spaces(zh_tokenizer_char):
      # note: three spaces after "I"
      tokens = zh_tokenizer_char("I   like cheese.")
      assert tokens[1].orth_ == "  "
keep keep keep keep replace keep keep keep
 Refactor Chinese tokenizer configuration (#5736)

* Refactor Chinese tokenizer configuration

Refactor `ChineseTokenizer` configuration so that it uses a single
`segmenter` setting to choose between character segmentation, jieba, and
pkuseg.

* replace `use_jieba`, `use_pkuseg`, `require_pkuseg` with the setting
`segmenter` with the supported values: `char`, `jieba`, `pkuseg`
* make the default segmenter plain character segmentation `char` (no
additional libraries required)

* Fix Chinese serialization test to use char default

* Warn if attempting to customize other segmenter

Add a warning if `Chinese.pkuseg_update_user_dict` is called when
another segmenter is selected. 
spacy/tests/lang/zh/test_tokenizer.py