  
  
  @pytest.fixture(scope="session")
  def zh_tokenizer_char():
      return get_lang_class("zh").Defaults.create_tokenizer(
          config={"use_jieba": False, "use_pkuseg": False}
      )
  
  
  @pytest.fixture(scope="session")
  def zh_tokenizer_jieba():
      pytest.importorskip("jieba")
 
</s> remove     return get_lang_class("zh").Defaults.create_tokenizer()
 </s> add     return get_lang_class("zh").Defaults.create_tokenizer(
        config={"segmenter": "jieba"}
    ) </s> remove         config={"pkuseg_model": "default", "use_jieba": False, "use_pkuseg": True}
 </s> add         config={"pkuseg_model": "default", "segmenter": "pkuseg"} </s> remove     use_jieba = True
    use_pkuseg = False
 </s> add  </s> remove                     "use_jieba": False,
                    "use_pkuseg": True,
 </s> add                     "segmenter": "pkuseg", </s> remove def try_pkuseg_import(use_pkuseg, pkuseg_model, pkuseg_user_dict):
 </s> add def try_pkuseg_import(segmenter, pkuseg_model, pkuseg_user_dict):
    return get_lang_class("zh").Defaults.create_tokenizer()
  
  
  @pytest.fixture(scope="session")
  def zh_tokenizer_char():
    return get_lang_class("zh").Defaults.create_tokenizer()
    return get_lang_class("zh").Defaults.create_tokenizer()
    return get_lang_class("zh").Defaults.create_tokenizer()
  
  
  @pytest.fixture(scope="session")
  def zh_tokenizer_jieba():
      pytest.importorskip("jieba")
keep keep keep keep replace replace replace keep keep 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/conftest.py