



'''simple docstring'''





import os
import pickle
import unittest

from transformers import AutoTokenizer
from transformers.models.bert.tokenization_bert import BertTokenizer
from transformers.models.bert_japanese.tokenization_bert_japanese import (
    VOCAB_FILES_NAMES,
    BertJapaneseTokenizer,
    CharacterTokenizer,
    JumanppTokenizer,
    MecabTokenizer,
    SudachiTokenizer,
    WordpieceTokenizer,
)
from transformers.testing_utils import custom_tokenizers, require_jumanpp, require_sudachi

from ...test_tokenization_common import TokenizerTesterMixin






@custom_tokenizers
class    lowerCamelCase_       (							SCREAMING_SNAKE_CASE_  ,  unittest.TestCase	):
  """simple docstring"""




  a_				   =BertJapaneseTokenizer
  a_				   =False
  a_				   =True




  def 		_lowercase	(					self :      Any  )   ->   int:
    super().setUp()

    __lowerCamelCase			:			Optional[int]       			=					[
        '[UNK]',
        '[CLS]',
        '[SEP]',
        'こんにちは',
        'こん',
        'にちは',
        'ばんは',
        '##こん',
        '##にちは',
        '##ばんは',
        '世界',
        '##世界',
        '、',
        '##、',
        '。',
        '##。',
    ]

    __lowerCamelCase			:			Union[str, Any]       			=					os.path.join(self.tmpdirname     ,      VOCAB_FILES_NAMES['vocab_file']  )
    with open(self.vocab_file     ,      'w'     ,      encoding='utf-8'  ) as vocab_writer:
      vocab_writer.write(''.join([x + '\n' for x in vocab_tokens]  )  )




  def 		_lowercase	(					self :      Tuple     ,      _a :      Union[str, Any]  )   ->   Any:
    __lowerCamelCase			:			Dict       			=					'こんにちは、世界。 \nこんばんは、世界。'
    __lowerCamelCase			:			Dict       			=					'こんにちは 、 世界 。 こんばんは 、 世界 。'
    return input_text, output_text




  def 		_lowercase	(					self :      Any     ,      _a :      Dict  )   ->   Any:
    __lowerCamelCase			,__lowerCamelCase			:			str       			=					self.get_input_output_texts(_a  )
    __lowerCamelCase			:			Dict       			=					tokenizer.encode(_a     ,      add_special_tokens=_a  )
    __lowerCamelCase			:			List[Any]       			=					tokenizer.decode(_a     ,      clean_up_tokenization_spaces=_a  )
    return text, ids




  def 		_lowercase	(					self :      int  )   ->   List[str]:
    pass  # TODO add if relevant




  def 		_lowercase	(					self :      int  )   ->   Dict:
    pass  # TODO add if relevant




  def 		_lowercase	(					self :      int  )   ->   Dict:
    pass  # TODO add if relevant




  def 		_lowercase	(					self :      Optional[Any]  )   ->   Optional[int]:
    __lowerCamelCase			:			Tuple       			=					self.tokenizer_class(self.vocab_file  )

    __lowerCamelCase			:			Optional[int]       			=					tokenizer.tokenize('こんにちは、世界。\nこんばんは、世界。'  )
    self.assertListEqual(_a     ,      ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']  )
    self.assertListEqual(tokenizer.convert_tokens_to_ids(_a  )     ,      [3, 12, 10, 14, 4, 9, 12, 10, 14]  )




  def 		_lowercase	(					self :      Optional[int]  )   ->   int:
    __lowerCamelCase			:			Dict       			=					self.tokenizer_class(self.vocab_file     ,      word_tokenizer_type='mecab'  )
    self.assertIsNotNone(_a  )

    __lowerCamelCase			:			int       			=					'こんにちは、世界。\nこんばんは、世界。'
    __lowerCamelCase			:			List[str]       			=					tokenizer.tokenize(_a  )
    self.assertListEqual(_a     ,      ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']  )
    self.assertListEqual(tokenizer.convert_tokens_to_ids(_a  )     ,      [3, 12, 10, 14, 4, 9, 12, 10, 14]  )

    __lowerCamelCase			:			Optional[Any]       			=					os.path.join(self.tmpdirname     ,      'tokenizer.bin'  )
    with open(_a     ,      'wb'  ) as handle:
      pickle.dump(_a     ,      _a  )

    with open(_a     ,      'rb'  ) as handle:
      __lowerCamelCase			:			List[Any]       			=					pickle.load(_a  )

    __lowerCamelCase			:			Dict       			=					tokenizer_new.tokenize(_a  )

    self.assertListEqual(_a     ,      _a  )




  def 		_lowercase	(					self :      Optional[Any]  )   ->   Optional[Any]:
    __lowerCamelCase			:			List[str]       			=					MecabTokenizer(mecab_dic='ipadic'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップルストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']     ,      )




  def 		_lowercase	(					self :      Dict  )   ->   List[str]:
    try:
      __lowerCamelCase			:			List[str]       			=					MecabTokenizer(mecab_dic='unidic_lite'  )
    except ModuleNotFoundError:
      return

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']     ,      )




  def 		_lowercase	(					self :      int  )   ->   Tuple:
    try:
      __lowerCamelCase			:			List[str]       			=					MecabTokenizer(mecab_dic='unidic'  )
    except ModuleNotFoundError:
      return

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']     ,      )




  def 		_lowercase	(					self :      Dict  )   ->   List[Any]:
    __lowerCamelCase			:			List[Any]       			=					MecabTokenizer(do_lower_case=_a     ,      mecab_dic='ipadic'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップルストア', 'で', 'iphone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']     ,      )




  def 		_lowercase	(					self :      Union[str, Any]  )   ->   List[str]:
    try:
      __lowerCamelCase			:			int       			=					MecabTokenizer(
          do_lower_case=_a     ,      normalize_text=_a     ,      mecab_option='-d /usr/local/lib/mecab/dic/jumandic'  )
    except RuntimeError:
      # if dict doesn't exist in the system, previous code raises this error.
      return

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['ｱｯﾌﾟﾙストア', 'で', 'iPhone', '８', 'が', '発売', 'さ', 'れた', '\u3000', '。']     ,      )




  def 		_lowercase	(					self :      List[str]  )   ->   Optional[Any]:
    __lowerCamelCase			:			Dict       			=					MecabTokenizer(normalize_text=_a     ,      mecab_dic='ipadic'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['ｱｯﾌﾟﾙストア', 'で', 'iPhone', '８', 'が', '発売', 'さ', 'れ', 'た', '　', '。']     ,      )




  @require_sudachi
  def 		_lowercase	(					self :      List[Any]  )   ->   List[str]:
    __lowerCamelCase			:			List[str]       			=					self.tokenizer_class(self.vocab_file     ,      word_tokenizer_type='sudachi'  )
    self.assertIsNotNone(_a  )

    __lowerCamelCase			:			Dict       			=					'こんにちは、世界。\nこんばんは、世界。'
    __lowerCamelCase			:			List[Any]       			=					tokenizer.tokenize(_a  )
    self.assertListEqual(_a     ,      ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']  )
    self.assertListEqual(tokenizer.convert_tokens_to_ids(_a  )     ,      [3, 12, 10, 14, 4, 9, 12, 10, 14]  )

    __lowerCamelCase			:			List[str]       			=					os.path.join(self.tmpdirname     ,      'tokenizer.bin'  )
    with open(_a     ,      'wb'  ) as handle:
      pickle.dump(_a     ,      _a  )

    with open(_a     ,      'rb'  ) as handle:
      __lowerCamelCase			:			Union[str, Any]       			=					pickle.load(_a  )

    __lowerCamelCase			:			Tuple       			=					tokenizer_new.tokenize(_a  )

    self.assertListEqual(_a     ,      _a  )




  @require_sudachi
  def 		_lowercase	(					self :      List[Any]  )   ->   List[Any]:
    __lowerCamelCase			:			Optional[Any]       			=					SudachiTokenizer(sudachi_dict_type='core'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      [' ', '\t', 'アップル', 'ストア', 'で', 'iPhone', '8', ' ', 'が', ' ', ' ', '\n ', '発売', 'さ', 'れ', 'た', ' ', '。', ' ', ' ']     ,      )




  @require_sudachi
  def 		_lowercase	(					self :      Tuple  )   ->   Any:
    __lowerCamelCase			:			int       			=					SudachiTokenizer(sudachi_dict_type='core'     ,      sudachi_split_mode='A'  )

    self.assertListEqual(tokenizer.tokenize('外国人参政権'  )     ,      ['外国', '人', '参政', '権']  )




  @require_sudachi
  def 		_lowercase	(					self :      int  )   ->   Tuple:
    __lowerCamelCase			:			Dict       			=					SudachiTokenizer(sudachi_dict_type='core'     ,      sudachi_split_mode='B'  )

    self.assertListEqual(tokenizer.tokenize('外国人参政権'  )     ,      ['外国人', '参政権']  )




  @require_sudachi
  def 		_lowercase	(					self :      Union[str, Any]  )   ->   str:
    __lowerCamelCase			:			Optional[Any]       			=					SudachiTokenizer(sudachi_dict_type='core'     ,      sudachi_split_mode='C'  )

    self.assertListEqual(tokenizer.tokenize('外国人参政権'  )     ,      ['外国人参政権']  )




  @require_sudachi
  def 		_lowercase	(					self :      Any  )   ->   Optional[Any]:
    __lowerCamelCase			:			Optional[int]       			=					SudachiTokenizer(do_lower_case=_a     ,      sudachi_dict_type='core'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      [' ', '\t', 'アップル', 'ストア', 'で', 'iphone', '8', ' ', 'が', ' ', ' ', '\n ', '発売', 'さ', 'れ', 'た', ' ', '。', ' ', ' ']     ,      )




  @require_sudachi
  def 		_lowercase	(					self :      Union[str, Any]  )   ->   List[Any]:
    __lowerCamelCase			:			str       			=					SudachiTokenizer(normalize_text=_a     ,      sudachi_dict_type='core'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      [' ', '\t', 'ｱｯﾌﾟﾙ', 'ストア', 'で', 'iPhone', '８', ' ', 'が', ' ', ' ', '\n ', '発売', 'さ', 'れ', 'た', '\u3000', '。', ' ', ' ']     ,      )




  @require_sudachi
  def 		_lowercase	(					self :      Optional[Any]  )   ->   Dict:
    __lowerCamelCase			:			Dict       			=					SudachiTokenizer(trim_whitespace=_a     ,      sudachi_dict_type='core'  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']     ,      )




  @require_jumanpp
  def 		_lowercase	(					self :      List[Any]  )   ->   Union[str, Any]:
    __lowerCamelCase			:			Any       			=					self.tokenizer_class(self.vocab_file     ,      word_tokenizer_type='jumanpp'  )
    self.assertIsNotNone(_a  )

    __lowerCamelCase			:			Any       			=					'こんにちは、世界。\nこんばんは、世界。'
    __lowerCamelCase			:			Optional[Any]       			=					tokenizer.tokenize(_a  )
    self.assertListEqual(_a     ,      ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']  )
    self.assertListEqual(tokenizer.convert_tokens_to_ids(_a  )     ,      [3, 12, 10, 14, 4, 9, 12, 10, 14]  )

    __lowerCamelCase			:			Union[str, Any]       			=					os.path.join(self.tmpdirname     ,      'tokenizer.bin'  )
    with open(_a     ,      'wb'  ) as handle:
      pickle.dump(_a     ,      _a  )

    with open(_a     ,      'rb'  ) as handle:
      __lowerCamelCase			:			str       			=					pickle.load(_a  )

    __lowerCamelCase			:			int       			=					tokenizer_new.tokenize(_a  )

    self.assertListEqual(_a     ,      _a  )




  @require_jumanpp
  def 		_lowercase	(					self :      Union[str, Any]  )   ->   List[Any]:
    __lowerCamelCase			:			List[Any]       			=					JumanppTokenizer()

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップル', 'ストア', 'で', 'iPhone', '8', '\u3000', 'が', '\u3000', '\u3000', '\u3000', '発売', 'さ', 'れた', '\u3000', '。']     ,      )




  @require_jumanpp
  def 		_lowercase	(					self :      List[str]  )   ->   Any:
    __lowerCamelCase			:			Any       			=					JumanppTokenizer(do_lower_case=_a  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップル', 'ストア', 'で', 'iphone', '8', '\u3000', 'が', '\u3000', '\u3000', '\u3000', '発売', 'さ', 'れた', '\u3000', '。']     ,      )




  @require_jumanpp
  def 		_lowercase	(					self :      Any  )   ->   Dict:
    __lowerCamelCase			:			int       			=					JumanppTokenizer(normalize_text=_a  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['ｱ', 'ｯ', 'ﾌ', 'ﾟ', 'ﾙ', 'ストア', 'で', 'iPhone', '８', '\u3000', 'が', '\u3000', '\u3000', '\u3000', '発売', 'さ', 'れた', '\u3000', '。']     ,      )




  @require_jumanpp
  def 		_lowercase	(					self :      int  )   ->   List[Any]:
    __lowerCamelCase			:			Any       			=					JumanppTokenizer(trim_whitespace=_a  )

    self.assertListEqual(
        tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '  )     ,      ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れた', '。']     ,      )




  @require_jumanpp
  def 		_lowercase	(					self :      Dict  )   ->   Any:
    __lowerCamelCase			:			str       			=					JumanppTokenizer()

    self.assertListEqual(
        tokenizer.tokenize('ありがとうございますm(_ _)ｍ見つけるのが大変です。'  )     ,      ['ありがとう', 'ございます', 'm(_ _)m', '見つける', 'の', 'が', '大変です', '。']     ,      )




  def 		_lowercase	(					self :      Dict  )   ->   Union[str, Any]:
    __lowerCamelCase			:			List[Any]       			=					['[UNK]', '[CLS]', '[SEP]', 'こんにちは', 'こん', 'にちは', 'ばんは', '##こん', '##にちは', '##ばんは']

    __lowerCamelCase			:			List[Any]       			=					{}
    for i, token in enumerate(_a  ):
      __lowerCamelCase			:			Tuple       			=					i
    __lowerCamelCase			:			Dict       			=					WordpieceTokenizer(vocab=_a     ,      unk_token='[UNK]'  )

    self.assertListEqual(tokenizer.tokenize(''  )     ,      []  )

    self.assertListEqual(tokenizer.tokenize('こんにちは'  )     ,      ['こんにちは']  )

    self.assertListEqual(tokenizer.tokenize('こんばんは'  )     ,      ['こん', '##ばんは']  )

    self.assertListEqual(tokenizer.tokenize('こんばんは こんばんにちは こんにちは'  )     ,      ['こん', '##ばんは', '[UNK]', 'こんにちは']  )




  def 		_lowercase	(					self :      Tuple  )   ->   Tuple:
    __lowerCamelCase			:			str       			=					BertJapaneseTokenizer.from_pretrained('nlp-waseda/roberta-base-japanese-with-auto-jumanpp'  )
    __lowerCamelCase			:			List[str]       			=					tokenizer.subword_tokenizer

    __lowerCamelCase			:			int       			=					subword_tokenizer.tokenize('国境 の 長い トンネル を 抜ける と 雪国 であった 。'  )
    self.assertListEqual(_a     ,      ['▁国境', '▁の', '▁長い', '▁トンネル', '▁を', '▁抜ける', '▁と', '▁雪', '国', '▁であった', '▁。']  )

    __lowerCamelCase			:			List[Any]       			=					subword_tokenizer.tokenize('こんばんは こんばん にち は こんにちは'  )
    self.assertListEqual(_a     ,      ['▁こん', 'ばん', 'は', '▁こん', 'ばん', '▁に', 'ち', '▁は', '▁こんにちは']  )




  def 		_lowercase	(					self :      Optional[Any]  )   ->   Tuple:
    __lowerCamelCase			:			Optional[int]       			=					self.tokenizer_class.from_pretrained('cl-tohoku/bert-base-japanese'  )

    __lowerCamelCase			:			List[Any]       			=					tokenizer.encode('ありがとう。'     ,      add_special_tokens=_a  )
    __lowerCamelCase			:			List[Any]       			=					tokenizer.encode('どういたしまして。'     ,      add_special_tokens=_a  )

    __lowerCamelCase			:			Union[str, Any]       			=					tokenizer.build_inputs_with_special_tokens(_a  )
    __lowerCamelCase			:			Tuple       			=					tokenizer.build_inputs_with_special_tokens(_a     ,      _a  )

    # 2 is for "[CLS]", 3 is for "[SEP]"
    assert encoded_sentence == [2] + text + [3]
    assert encoded_pair == [2] + text + [3] + text_a + [3]






@custom_tokenizers
class    lowerCamelCase_       (							SCREAMING_SNAKE_CASE_  ,  unittest.TestCase	):
  """simple docstring"""




  a_				   =BertJapaneseTokenizer
  a_				   =False




  def 		_lowercase	(					self :      Any  )   ->   Optional[int]:
    super().setUp()

    __lowerCamelCase			:			Optional[Any]       			=					['[UNK]', '[CLS]', '[SEP]', 'こ', 'ん', 'に', 'ち', 'は', 'ば', '世', '界', '、', '。']

    __lowerCamelCase			:			Optional[int]       			=					os.path.join(self.tmpdirname     ,      VOCAB_FILES_NAMES['vocab_file']  )
    with open(self.vocab_file     ,      'w'     ,      encoding='utf-8'  ) as vocab_writer:
      vocab_writer.write(''.join([x + '\n' for x in vocab_tokens]  )  )




  def 		_lowercase	(					self :      int     ,      **_a :      Dict  )   ->   Union[str, Any]:
    return BertJapaneseTokenizer.from_pretrained(self.tmpdirname     ,      subword_tokenizer_type='character'     ,      **_a  )




  def 		_lowercase	(					self :      int     ,      _a :      List[Any]  )   ->   Optional[Any]:
    __lowerCamelCase			:			str       			=					'こんにちは、世界。 \nこんばんは、世界。'
    __lowerCamelCase			:			Dict       			=					'こ ん に ち は 、 世 界 。 こ ん ば ん は 、 世 界 。'
    return input_text, output_text




  def 		_lowercase	(					self :      Any  )   ->   Optional[int]:
    pass  # TODO add if relevant




  def 		_lowercase	(					self :      Union[str, Any]  )   ->   Dict:
    pass  # TODO add if relevant




  def 		_lowercase	(					self :      Any  )   ->   Any:
    pass  # TODO add if relevant




  def 		_lowercase	(					self :      Tuple  )   ->   List[str]:
    __lowerCamelCase			:			str       			=					self.tokenizer_class(self.vocab_file     ,      subword_tokenizer_type='character'  )

    __lowerCamelCase			:			Optional[int]       			=					tokenizer.tokenize('こんにちは、世界。 \nこんばんは、世界。'  )
    self.assertListEqual(
        _a     ,      ['こ', 'ん', 'に', 'ち', 'は', '、', '世', '界', '。', 'こ', 'ん', 'ば', 'ん', 'は', '、', '世', '界', '。']  )
    self.assertListEqual(
        tokenizer.convert_tokens_to_ids(_a  )     ,      [3, 4, 5, 6, 7, 11, 9, 10, 12, 3, 4, 8, 4, 7, 11, 9, 10, 12]  )




  def 		_lowercase	(					self :      List[Any]  )   ->   str:
    __lowerCamelCase			:			Tuple       			=					['[UNK]', '[CLS]', '[SEP]', 'こ', 'ん', 'に', 'ち', 'は', 'ば', '世', '界', '、', '。']

    __lowerCamelCase			:			List[Any]       			=					{}
    for i, token in enumerate(_a  ):
      __lowerCamelCase			:			Dict       			=					i
    __lowerCamelCase			:			Union[str, Any]       			=					CharacterTokenizer(vocab=_a     ,      unk_token='[UNK]'  )

    self.assertListEqual(tokenizer.tokenize(''  )     ,      []  )

    self.assertListEqual(tokenizer.tokenize('こんにちは'  )     ,      ['こ', 'ん', 'に', 'ち', 'は']  )

    self.assertListEqual(tokenizer.tokenize('こんにちほ'  )     ,      ['こ', 'ん', 'に', 'ち', '[UNK]']  )




  def 		_lowercase	(					self :      int  )   ->   List[Any]:
    __lowerCamelCase			:			Any       			=					self.tokenizer_class.from_pretrained('cl-tohoku/bert-base-japanese-char'  )

    __lowerCamelCase			:			Any       			=					tokenizer.encode('ありがとう。'     ,      add_special_tokens=_a  )
    __lowerCamelCase			:			Dict       			=					tokenizer.encode('どういたしまして。'     ,      add_special_tokens=_a  )

    __lowerCamelCase			:			Tuple       			=					tokenizer.build_inputs_with_special_tokens(_a  )
    __lowerCamelCase			:			Union[str, Any]       			=					tokenizer.build_inputs_with_special_tokens(_a     ,      _a  )

    # 2 is for "[CLS]", 3 is for "[SEP]"
    assert encoded_sentence == [2] + text + [3]
    assert encoded_pair == [2] + text + [3] + text_a + [3]






@custom_tokenizers
class    lowerCamelCase_       (							unittest.TestCase	):
  """simple docstring"""




  def 		_lowercase	(					self :      int  )   ->   Any:
    __lowerCamelCase			:			Optional[int]       			=					'cl-tohoku/bert-base-japanese'
    __lowerCamelCase			:			List[Any]       			=					AutoTokenizer.from_pretrained(_a  )
    self.assertIsInstance(_a     ,      _a  )






class    lowerCamelCase_       (							unittest.TestCase	):
  """simple docstring"""




  def 		_lowercase	(					self :      int  )   ->   str:
    __lowerCamelCase			:			Tuple       			=					'cl-tohoku/bert-base-japanese'
    with self.assertLogs('transformers'     ,      level='WARNING'  ) as cm:
      BertTokenizer.from_pretrained(_a  )
      self.assertTrue(
          cm.records[0].message.startswith(
              'The tokenizer class you load from this checkpoint is not the same type as the class this function'
              ' is called from.'  )  )
    __lowerCamelCase			:			List[str]       			=					'bert-base-cased'
    with self.assertLogs('transformers'     ,      level='WARNING'  ) as cm:
      BertJapaneseTokenizer.from_pretrained(_a  )
      self.assertTrue(
          cm.records[0].message.startswith(
              'The tokenizer class you load from this checkpoint is not the same type as the class this function'
              ' is called from.'  )  )











'''simple docstring'''





# Algorithm for the pigeonhole sorting



def 			a_	(				_lowerCAmelCase			) -> List[str]:
  __lowerCamelCase			:			int       			=					min(_lowerCAmelCase			)  # min() finds the minimum value
  __lowerCamelCase			:			List[Any]       			=					max(_lowerCAmelCase			)  # max() finds the maximum value

  __lowerCamelCase			:			List[Any]       			=					max_val - min_val + 1  # size is difference of max and min values plus one

  # list of pigeonholes of size equal to the variable size
  __lowerCamelCase			:			List[Any]       			=					[0] * size

  # Populate the pigeonholes.
  for x in a:
    assert isinstance(_lowerCAmelCase			,_lowerCAmelCase			), "integers only please"
    holes[x - min_val] += 1

  # Putting the elements back into the array in an order.
  __lowerCamelCase			:			Tuple       			=					0
  for count in range(_lowerCAmelCase			):
    while holes[count] > 0:
      holes[count] -= 1
      __lowerCamelCase			:			List[Any]       			=					count + min_val
      i += 1

def 			a_	(				) -> str:
  __lowerCamelCase			:			Optional[Any]       			=					[8, 3, 2, 7, 4, 6, 8]
  pigeonhole_sort(_lowerCAmelCase			)
  print('Sorted order is:'			,' '.join(_lowerCAmelCase			)			)


if __name__ == "__main__":
   main()






