docstr: Construct a SudachiPy-based tokenizer.
  
  Note that this tokenizer uses regex for sentence segmentation.
docstr_tok: ["Construct","a","SudachiPy-based","tokenizer",".","Note","that","this","tokenizer","uses","regex","for","sentence","segmentation","."]
code: def __init__(self, config):
      """Construct a SudachiPy-based tokenizer.
  
      Note that this tokenizer uses regex for sentence segmentation.
      """
      if config["lang"] != "ja":
          raise Exception(
              "SudachiPy tokenizer is only allowed in Japanese pipelines."
          )
  
      check_sudachipy()
      from sudachipy import tokenizer
      from sudachipy import dictionary
  
      self.tokenizer = dictionary.Dictionary().create()
      self.no_ssplit = config.get("no_ssplit", False)
  
file_path: stanza/stanza/pipeline/external/sudachipy.py
imports: import re
  from stanza.models.common import doc
  from stanza.pipeline._constants import TOKENIZE
  from stanza.pipeline.processor import ProcessorVariant, register_processor_variant
label_desc: Use image node_id 1 to create a new SudachiPyTokenizer object from inherited base classes: ProcessorVariant with example: obj = SudachiPyTokenizer(config)