class_docstr: Tokenizer using konoha to support popular japanese tokenizers.
  
  Tokenizer using konoha, a third party library which supports
  multiple Japanese tokenizer such as MeCab, Janome and SudachiPy.
  
  For further details see:
      https://github.com/himkt/konoha
class_docstr_tok: ["Tokenizer","using","konoha","to","support","popular","japanese","tokenizers",".","Tokenizer","using","konoha",",","a","third","party","library","which","supports","multiple","Japanese","tokenizer","such","as","MeCab",",","Janome","and","SudachiPy",".","For","further","details","see",":","https",":","\/\/github.com\/himkt\/konoha"]
code: def __init__(self, tokenizer: str, sudachi_mode: str = "A") -> None:
      super().__init__()
  
      available_tokenizers = ["mecab", "janome", "sudachi"]
  
      if tokenizer.lower() not in available_tokenizers:
          raise NotImplementedError(
              f"Currently, {tokenizer} is only supported. Supported tokenizers: {available_tokenizers}."
          )
  
      try:
          import konoha
      except ModuleNotFoundError:
          log.warning("-" * 100)
          log.warning(
              'ATTENTION! The library "konoha" is not installed!'
          )
          log.warning(
              '- If you want to use MeCab, install mecab with "sudo apt install mecab libmecab-dev mecab-ipadic".'
          )
          log.warning(
              '- Install konoha with "pip install konoha[{tokenizer_name}]"'
          )
          log.warning(
              '  - You can choose tokenizer from ["mecab", "janome", "sudachi"].'
          )
          log.warning(
              "Note that we Flair support only konoha<5.0.0,>=4.0.0"
          )
          log.warning("-" * 100)
          sys.exit()
  
      self.tokenizer = tokenizer
      self.sentence_tokenizer = konoha.SentenceTokenizer()
      self.word_tokenizer = konoha.WordTokenizer(
          tokenizer, mode=sudachi_mode
      )
  
imports: import logging
  import sys
  from abc import ABC, abstractmethod
  from typing import Callable, List
  from segtok.segmenter import split_single
  from segtok.tokenizer import split_contractions, word_tokenizer
label_desc: Use image node_id 1 to create a new JapaneseTokenizer object from inherited base classes: Tokenizer with example: obj = JapaneseTokenizer(tokenizer, sudachi_mode)