



"""simple docstring"""





import re
import string

import numpy as np

import datasets


lowerCamelCase  			=		"""
Returns the rate at which the input predicted strings exactly match their references, ignoring any strings input as part of the regexes_to_ignore list.
"""

lowerCamelCase  			=		"""
Args:
    predictions: List of predicted texts.
    references: List of reference texts.
    regexes_to_ignore: List, defaults to None. Regex expressions of characters to
        ignore when calculating the exact matches. Note: these regexes are removed
        from the input data before the changes based on the options below (e.g. ignore_case,
        ignore_punctuation, ignore_numbers) are applied.
    ignore_case: Boolean, defaults to False. If true, turns everything
        to lowercase so that capitalization differences are ignored.
    ignore_punctuation: Boolean, defaults to False. If true, removes all punctuation before
        comparing predictions and references.
    ignore_numbers: Boolean, defaults to False. If true, removes all punctuation before
        comparing predictions and references.
Returns:
    exact_match: Dictionary containing exact_match rate. Possible values are between 0.0 and 100.0, inclusive.
Examples:
    >>> exact_match = datasets.load_metric(\"exact_match\")
    >>> refs = [\"the cat\", \"theater\", \"YELLING\", \"agent007\"]
    >>> preds = [\"cat?\", \"theater\", \"yelling\", \"agent\"]
    >>> results = exact_match.compute(references=refs, predictions=preds)
    >>> print(round(results[\"exact_match\"], 1))
    25.0

    >>> exact_match = datasets.load_metric(\"exact_match\")
    >>> refs = [\"the cat\", \"theater\", \"YELLING\", \"agent007\"]
    >>> preds = [\"cat?\", \"theater\", \"yelling\", \"agent\"]
    >>> results = exact_match.compute(references=refs, predictions=preds, regexes_to_ignore=[\"the \", \"yell\"], ignore_case=True, ignore_punctuation=True)
    >>> print(round(results[\"exact_match\"], 1))
    50.0


    >>> exact_match = datasets.load_metric(\"exact_match\")
    >>> refs = [\"the cat\", \"theater\", \"YELLING\", \"agent007\"]
    >>> preds = [\"cat?\", \"theater\", \"yelling\", \"agent\"]
    >>> results = exact_match.compute(references=refs, predictions=preds, regexes_to_ignore=[\"the \", \"yell\", \"YELL\"], ignore_case=True, ignore_punctuation=True)
    >>> print(round(results[\"exact_match\"], 1))
    75.0

    >>> exact_match = datasets.load_metric(\"exact_match\")
    >>> refs = [\"the cat\", \"theater\", \"YELLING\", \"agent007\"]
    >>> preds = [\"cat?\", \"theater\", \"yelling\", \"agent\"]
    >>> results = exact_match.compute(references=refs, predictions=preds, regexes_to_ignore=[\"the \", \"yell\", \"YELL\"], ignore_case=True, ignore_punctuation=True, ignore_numbers=True)
    >>> print(round(results[\"exact_match\"], 1))
    100.0

    >>> exact_match = datasets.load_metric(\"exact_match\")
    >>> refs = [\"The cat sat on the mat.\", \"Theaters are great.\", \"It's like comparing oranges and apples.\"]
    >>> preds = [\"The cat sat on the mat?\", \"Theaters are great.\", \"It's like comparing apples and oranges.\"]
    >>> results = exact_match.compute(references=refs, predictions=preds)
    >>> print(round(results[\"exact_match\"], 1))
    33.3

"""

lowerCamelCase  			=		"""
"""
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION							,   _KWARGS_DESCRIPTION )
class  lowercase__  (       datasets.Metric ):







       '''simple docstring'''


       def 	lowercase__							(				self     :    List[str]       )					->		Dict:


             '''simple docstring'''




             return datasets.MetricInfo(
                 description=_DESCRIPTION						,							citation=_CITATION						,							inputs_description=_KWARGS_DESCRIPTION						,							features=datasets.Features(
                     {
                         "predictions": datasets.Value("string"						,							id="sequence"       ),
                         "references": datasets.Value("string"						,							id="sequence"       ),
                     }       )						,							reference_urls=[]						,							)







       def 	lowercase__							(				self     :    Any						,							_UpperCAmelCase     :    Dict						,							_UpperCAmelCase     :    List[Any]						,							_UpperCAmelCase     :    Optional[Any]=None						,							_UpperCAmelCase     :    List[Any]=False						,							_UpperCAmelCase     :    Tuple=False						,							_UpperCAmelCase     :    Optional[Any]=False						,							)					->		Dict:


             '''simple docstring'''




             if regexes_to_ignore is not None:
                   for s in regexes_to_ignore:
                         UpperCAmelCase_     					=				np.array([re.sub(_UpperCAmelCase						,							""						,							_UpperCAmelCase       ) for x in predictions]       )
                         UpperCAmelCase_     					=				np.array([re.sub(_UpperCAmelCase						,							""						,							_UpperCAmelCase       ) for x in references]       )
             else:
                   UpperCAmelCase_     					=				np.asarray(_UpperCAmelCase       )
                   UpperCAmelCase_     					=				np.asarray(_UpperCAmelCase       )

             if ignore_case:
                   UpperCAmelCase_     					=				np.char.lower(_UpperCAmelCase       )
                   UpperCAmelCase_     					=				np.char.lower(_UpperCAmelCase       )

             if ignore_punctuation:
                   UpperCAmelCase_     					=				string.punctuation.maketrans(""						,							""						,							string.punctuation       )
                   UpperCAmelCase_     					=				np.char.translate(_UpperCAmelCase						,							table=_UpperCAmelCase       )
                   UpperCAmelCase_     					=				np.char.translate(_UpperCAmelCase						,							table=_UpperCAmelCase       )

             if ignore_numbers:
                   UpperCAmelCase_     					=				string.digits.maketrans(""						,							""						,							string.digits       )
                   UpperCAmelCase_     					=				np.char.translate(_UpperCAmelCase						,							table=_UpperCAmelCase       )
                   UpperCAmelCase_     					=				np.char.translate(_UpperCAmelCase						,							table=_UpperCAmelCase       )

             UpperCAmelCase_     					=				predictions == references

             return {"exact_match": np.mean(_UpperCAmelCase       ) * 100}












import json
import os
import re
import shutil
import tempfile
import unittest
from typing import Tuple

from transformers import AddedToken, BatchEncoding, ByTaTokenizer
from transformers.utils import cached_property, is_tf_available, is_torch_available

from ...test_tokenization_common import TokenizerTesterMixin


if is_torch_available():
			UpperCAmelCase__      			=						'''pt'''
elif is_tf_available():
			UpperCAmelCase__      			=						'''tf'''
else:
			UpperCAmelCase__      			=						'''jax'''




class 							snake_case_       (    __UpperCamelCase		,							unittest.TestCase      ):

						"""simple docstring"""



						snake_case__        =      ByTaTokenizer
						snake_case__        =      False



						def        UpperCAmelCase__					(self:					int   )    ->     str:




											'''simple docstring'''



											super().setUp()
											__a					:						int      =					ByTaTokenizer()
											tokenizer.save_pretrained(self.tmpdirname   )



						@cached_property
						def        UpperCAmelCase__					(self:					Any   )    ->     Optional[int]:




											'''simple docstring'''



											return ByTaTokenizer.from_pretrained("google/byt5-small"   )



						def        UpperCAmelCase__					(self:					List[str] ,					**__UpperCAmelCase:					Dict   )    ->     ByTaTokenizer:




											'''simple docstring'''



											return self.tokenizer_class.from_pretrained(self.tmpdirname ,					**__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					int ,					__UpperCAmelCase:					Tuple ,					__UpperCAmelCase:					Optional[int]=False ,					__UpperCAmelCase:					Optional[Any]=20 ,					__UpperCAmelCase:					Tuple=5   )    ->     Tuple[str, list]:




											'''simple docstring'''



											__a					:						Tuple      =					[]
											for i in range(len(__UpperCAmelCase   )   ):
																try:
																					__a					:						Union[str, Any]      =					tokenizer.decode([i] ,					clean_up_tokenization_spaces=__UpperCAmelCase   )
																except UnicodeDecodeError:
																					pass
																toks.append((i, tok)   )

											__a					:						Any      =					list(filter(lambda __UpperCAmelCase   : re.match(R"^[ a-zA-Z]+$" ,					t[1]   ) ,					__UpperCAmelCase   )   )
											__a					:						int      =					list(filter(lambda __UpperCAmelCase   : [t[0]] == tokenizer.encode(t[1] ,					add_special_tokens=__UpperCAmelCase   ) ,					__UpperCAmelCase   )   )
											if max_length is not None and len(__UpperCAmelCase   ) > max_length:
																__a					:						str      =					toks[:max_length]
											if min_length is not None and len(__UpperCAmelCase   ) < min_length and len(__UpperCAmelCase   ) > 0:
																while len(__UpperCAmelCase   ) < min_length:
																					__a					:						List[str]      =					toks + toks
        # toks_str = [t[1] for t in toks]
											__a					:						Optional[int]      =					[t[0] for t in toks]

											# Ensure consistency
											__a					:						Any      =					tokenizer.decode(__UpperCAmelCase ,					clean_up_tokenization_spaces=__UpperCAmelCase   )
											if " " not in output_txt and len(__UpperCAmelCase   ) > 1:
																__a					:						Union[str, Any]      =					(
																    tokenizer.decode([toks_ids[0]] ,					clean_up_tokenization_spaces=__UpperCAmelCase   )
																    + " "
																    + tokenizer.decode(toks_ids[1:] ,					clean_up_tokenization_spaces=__UpperCAmelCase   )
																)
											if with_prefix_space:
																__a					:						Tuple      =					" " + output_txt
											__a					:						Tuple      =					tokenizer.encode(__UpperCAmelCase ,					add_special_tokens=__UpperCAmelCase   )
											return output_txt, output_ids



						def        UpperCAmelCase__					(self:					Tuple   )    ->     List[Any]:




											'''simple docstring'''



											__a					:						Any      =					self.ta_base_tokenizer
											__a					:						str      =					tokenizer(["hi</s>", "I went to the gym</s>", "</s>"]   )
											__a					:						int      =					tokenizer(["hi", "I went to the gym", ""]   )
											self.assertListEqual(batch_with_eos_added["input_ids"] ,					batch_without_eos_added["input_ids"]   )



						def        UpperCAmelCase__					(self:					List[str]   )    ->     Union[str, Any]:




											'''simple docstring'''



											__a					:						Any      =					self.ta_base_tokenizer
											__a					:						int      =					"Unicode €."
											__a					:						int      =					tokenizer(__UpperCAmelCase   )
											__a					:						List[Any]      =					[88, 113, 108, 102, 114, 103, 104, 35, 229, 133, 175, 49, 1]
											self.assertEqual(encoded["input_ids"] ,					__UpperCAmelCase   )

											# decoding
											__a					:						List[str]      =					tokenizer.decode(__UpperCAmelCase   )
											self.assertEqual(__UpperCAmelCase ,					"Unicode €.</s>"   )

											__a					:						Optional[int]      =					tokenizer("e è é ê ë"   )
											__a					:						List[str]      =					[104, 35, 198, 171, 35, 198, 172, 35, 198, 173, 35, 198, 174, 1]
											self.assertEqual(encoded["input_ids"] ,					__UpperCAmelCase   )
											# decoding
											__a					:						Optional[Any]      =					tokenizer.decode(__UpperCAmelCase   )
											self.assertEqual(__UpperCAmelCase ,					"e è é ê ë</s>"   )

											# encode/decode, but with `encode` instead of `__call__`
											self.assertEqual(tokenizer.decode(tokenizer.encode("e è é ê ë"   )   ) ,					"e è é ê ë</s>"   )



						def        UpperCAmelCase__					(self:					List[str]   )    ->     Optional[int]:




											'''simple docstring'''



											__a					:						Optional[Any]      =					self.ta_base_tokenizer
											__a					:						Any      =					["A long paragraph for summarization.", "Another paragraph for summarization."]
											# fmt: off
											__a					:						Optional[int]      =					[68, 35, 111, 114, 113, 106, 35, 115, 100, 117, 100, 106, 117, 100, 115, 107, 35, 105, 114, 117, 35, 118, 120, 112, 112, 100, 117, 108, 125, 100, 119, 108, 114, 113, 49, 1, 0]
											# fmt: on
											__a					:						Optional[Any]      =					tokenizer(__UpperCAmelCase ,					padding=__UpperCAmelCase ,					return_tensors=__UpperCAmelCase   )
											self.assertIsInstance(__UpperCAmelCase ,					__UpperCAmelCase   )

											if FRAMEWORK != "jax":
																__a					:						Optional[int]      =					list(batch.input_ids.numpy()[0]   )
											else:
																__a					:						List[Any]      =					list(batch.input_ids.tolist()[0]   )

											self.assertListEqual(__UpperCAmelCase ,					__UpperCAmelCase   )

											self.assertEqual((2, 37) ,					batch.input_ids.shape   )
											self.assertEqual((2, 37) ,					batch.attention_mask.shape   )



						def        UpperCAmelCase__					(self:					Union[str, Any]   )    ->     Union[str, Any]:




											'''simple docstring'''



											__a					:						int      =					self.ta_base_tokenizer
											__a					:						str      =					["A long paragraph for summarization.", "Another paragraph for summarization."]
											__a					:						Optional[Any]      =					tokenizer(__UpperCAmelCase ,					padding=__UpperCAmelCase ,					return_tensors=__UpperCAmelCase   )
											# check if input_ids are returned and no decoder_input_ids
											self.assertIn("input_ids" ,					__UpperCAmelCase   )
											self.assertIn("attention_mask" ,					__UpperCAmelCase   )
											self.assertNotIn("decoder_input_ids" ,					__UpperCAmelCase   )
											self.assertNotIn("decoder_attention_mask" ,					__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Union[str, Any]   )    ->     str:




											'''simple docstring'''



											__a					:						List[str]      =					self.ta_base_tokenizer
											__a					:						Optional[int]      =					[
											    "Summary of the text.",
											    "Another summary.",
											]
											__a					:						Union[str, Any]      =					tokenizer(
											    text_target=__UpperCAmelCase ,					max_length=32 ,					padding="max_length" ,					truncation=__UpperCAmelCase ,					return_tensors=__UpperCAmelCase   )
											self.assertEqual(32 ,					targets["input_ids"].shape[1]   )



						def        UpperCAmelCase__					(self:					str   )    ->     str:




											'''simple docstring'''



											__a					:						Union[str, Any]      =					self.ta_base_tokenizer
											__a					:						Union[str, Any]      =					["A long paragraph for summarization. </s>"]
											__a					:						Dict      =					["Summary of the text. </s>"]
											# fmt: off
											__a					:						str      =					[68, 35, 111, 114, 113, 106, 35, 115, 100, 117, 100, 106, 117, 100, 115, 107, 35, 105, 114, 117, 35, 118, 120, 112, 112, 100, 117, 108, 125, 100, 119, 108, 114, 113, 49, 35, 1]
											__a					:						Union[str, Any]      =					[86, 120, 112, 112, 100, 117, 124, 35, 114, 105, 35, 119, 107, 104, 35, 119, 104, 123, 119, 49, 35, 1]
											# fmt: on

											__a					:						int      =					tokenizer(__UpperCAmelCase ,					text_target=__UpperCAmelCase   )

											self.assertEqual(__UpperCAmelCase ,					batch["input_ids"][0]   )
											self.assertEqual(__UpperCAmelCase ,					batch["labels"][0]   )



						def        UpperCAmelCase__					(self:					Union[str, Any]   )    ->     Tuple:




											'''simple docstring'''



											__a					:						Optional[Any]      =					self.get_tokenizers()
											for tokenizer in tokenizers:
																with self.subTest(f'{tokenizer.__class__.__name__}'   ):
																					self.assertNotEqual(tokenizer.model_max_length ,					42   )

        # Now let's start the test
											__a					:						str      =					self.get_tokenizers()
											for tokenizer in tokenizers:
																with self.subTest(f'{tokenizer.__class__.__name__}'   ):
																					# Isolate this from the other tests because we save additional tokens/etc
																					__a					:						int      =					tempfile.mkdtemp()

																					__a					:						Optional[int]      =					" He is very happy, UNwant\u00E9d,running"
																					__a					:						str      =					tokenizer.encode(__UpperCAmelCase ,					add_special_tokens=__UpperCAmelCase   )
																					tokenizer.save_pretrained(__UpperCAmelCase   )

																					__a					:						int      =					tokenizer.__class__.from_pretrained(__UpperCAmelCase   )
																					__a					:						Tuple      =					after_tokenizer.encode(__UpperCAmelCase ,					add_special_tokens=__UpperCAmelCase   )
																					self.assertListEqual(__UpperCAmelCase ,					__UpperCAmelCase   )

																					shutil.rmtree(__UpperCAmelCase   )

											__a					:						List[str]      =					self.get_tokenizers(model_max_length=42   )
											for tokenizer in tokenizers:
																with self.subTest(f'{tokenizer.__class__.__name__}'   ):
																					# Isolate this from the other tests because we save additional tokens/etc
																					__a					:						Optional[int]      =					tempfile.mkdtemp()

																					__a					:						Any      =					" He is very happy, UNwant\u00E9d,running"
																					tokenizer.add_tokens(["bim", "bambam"]   )
																					__a					:						List[str]      =					tokenizer.additional_special_tokens
																					additional_special_tokens.append("new_additional_special_token"   )
																					tokenizer.add_special_tokens({"additional_special_tokens": additional_special_tokens}   )
																					__a					:						Tuple      =					tokenizer.encode(__UpperCAmelCase ,					add_special_tokens=__UpperCAmelCase   )
																					tokenizer.save_pretrained(__UpperCAmelCase   )

																					__a					:						Optional[Any]      =					tokenizer.__class__.from_pretrained(__UpperCAmelCase   )
																					__a					:						List[str]      =					after_tokenizer.encode(__UpperCAmelCase ,					add_special_tokens=__UpperCAmelCase   )
																					self.assertListEqual(__UpperCAmelCase ,					__UpperCAmelCase   )
																					self.assertIn("new_additional_special_token" ,					after_tokenizer.additional_special_tokens   )
																					self.assertEqual(after_tokenizer.model_max_length ,					42   )

																					__a					:						List[Any]      =					tokenizer.__class__.from_pretrained(__UpperCAmelCase ,					model_max_length=43   )
																					self.assertEqual(tokenizer.model_max_length ,					43   )

																					shutil.rmtree(__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Optional[int]   )    ->     Tuple:




											'''simple docstring'''



											__a					:						Tuple      =					[]
											if self.test_slow_tokenizer:
																tokenizer_list.append((self.tokenizer_class, self.get_tokenizer())   )

											if self.test_rust_tokenizer:
																tokenizer_list.append((self.rust_tokenizer_class, self.get_rust_tokenizer())   )

											for tokenizer_class, tokenizer_utils in tokenizer_list:
																with tempfile.TemporaryDirectory() as tmp_dir:
																					tokenizer_utils.save_pretrained(__UpperCAmelCase   )

																					with open(os.path.join(__UpperCAmelCase ,					"special_tokens_map.json"   ) ,					encoding="utf-8"   ) as json_file:
																										__a					:						Optional[int]      =					json.load(__UpperCAmelCase   )

																					with open(os.path.join(__UpperCAmelCase ,					"tokenizer_config.json"   ) ,					encoding="utf-8"   ) as json_file:
																										__a					:						Any      =					json.load(__UpperCAmelCase   )

																					__a					:						Optional[Any]      =					[f'<extra_id_{i}>' for i in range(125   )]

																					__a					:						Any      =					added_tokens_extra_ids + [
																					    "an_additional_special_token"
																					]
																					__a					:						Union[str, Any]      =					added_tokens_extra_ids + [
																					    "an_additional_special_token"
																					]

																					with open(os.path.join(__UpperCAmelCase ,					"special_tokens_map.json"   ) ,					"w" ,					encoding="utf-8"   ) as outfile:
																										json.dump(__UpperCAmelCase ,					__UpperCAmelCase   )
																					with open(os.path.join(__UpperCAmelCase ,					"tokenizer_config.json"   ) ,					"w" ,					encoding="utf-8"   ) as outfile:
																										json.dump(__UpperCAmelCase ,					__UpperCAmelCase   )

																					# the following checks allow us to verify that our test works as expected, i.e. that the tokenizer takes
																					# into account the new value of additional_special_tokens given in the "tokenizer_config.json" and
																					# "special_tokens_map.json" files
																					__a					:						Union[str, Any]      =					tokenizer_class.from_pretrained(
																					    __UpperCAmelCase ,					)
																					self.assertIn(
																					    "an_additional_special_token" ,					tokenizer_without_change_in_init.additional_special_tokens   )
																					# self.assertIn("an_additional_special_token",tokenizer_without_change_in_init.get_vocab()) # ByT5Tokenization no vocab
																					self.assertEqual(
																					    ["an_additional_special_token"] ,					tokenizer_without_change_in_init.convert_ids_to_tokens(
																					        tokenizer_without_change_in_init.convert_tokens_to_ids(["an_additional_special_token"]   )   ) ,					)

																					# Now we test that we can change the value of additional_special_tokens in the from_pretrained
																					__a					:						Union[str, Any]      =					added_tokens_extra_ids + [AddedToken("a_new_additional_special_token" ,					lstrip=__UpperCAmelCase   )]
																					__a					:						int      =					tokenizer_class.from_pretrained(
																					    __UpperCAmelCase ,					additional_special_tokens=__UpperCAmelCase ,					)

																					self.assertIn("a_new_additional_special_token" ,					tokenizer.additional_special_tokens   )
																					self.assertEqual(
																					    ["a_new_additional_special_token"] ,					tokenizer.convert_ids_to_tokens(
																					        tokenizer.convert_tokens_to_ids(["a_new_additional_special_token"]   )   ) ,					)



						def        UpperCAmelCase__					(self:					List[str]   )    ->     List[str]:




											'''simple docstring'''



											__a					:						Optional[int]      =					[]
											if self.test_slow_tokenizer:
																tokenizer_list.append((self.tokenizer_class, self.get_tokenizer())   )

											if self.test_rust_tokenizer:
																tokenizer_list.append((self.rust_tokenizer_class, self.get_rust_tokenizer())   )

											for tokenizer_class, tokenizer_utils in tokenizer_list:
																with tempfile.TemporaryDirectory() as tmp_dir:
																					tokenizer_utils.save_pretrained(__UpperCAmelCase   )

																					__a					:						Tuple      =					tokenizer_class.from_pretrained(__UpperCAmelCase   )

																					self.assertTrue(tokenizer.decode([255]   ) == ""   )



						def        UpperCAmelCase__					(self:					Optional[int]   )    ->     str:




											'''simple docstring'''



											pass



						def        UpperCAmelCase__					(self:					str   )    ->     str:




											'''simple docstring'''



											pass



						def        UpperCAmelCase__					(self:					List[Any]   )    ->     Any:




											'''simple docstring'''



											pass



						def        UpperCAmelCase__					(self:					Dict   )    ->     Union[str, Any]:




											'''simple docstring'''



											pass



						def        UpperCAmelCase__					(self:					Dict   )    ->     int:




											'''simple docstring'''



											__a					:						Optional[int]      =					self.get_tokenizers(fast=__UpperCAmelCase ,					do_lower_case=__UpperCAmelCase   )
											for tokenizer in tokenizers:
																with self.subTest(f'{tokenizer.__class__.__name__}'   ):
																					__a					:						List[str]      =					["t", "h", "i", "s", " ", "i", "s", " ", "a", " ", "t", "e", "x", "t", "</s>"]
																					__a					:						Any      =					tokenizer.convert_tokens_to_string(__UpperCAmelCase   )

																					self.assertIsInstance(__UpperCAmelCase ,					__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					List[Any]   )    ->     Any:




											'''simple docstring'''



											__a					:						Union[str, Any]      =					self.get_tokenizers()
											for tokenizer in tokenizers:
																with self.subTest(f'{tokenizer.__class__.__name__}'   ):
																					__a					:						Tuple      =					[
																					    "bos_token",
																					    "eos_token",
																					    "unk_token",
																					    "sep_token",
																					    "pad_token",
																					    "cls_token",
																					    "mask_token",
																					]

																					__a					:						int      =					0
																					__a					:						Optional[Any]      =					tokenizer.convert_ids_to_tokens(
																					    __UpperCAmelCase ,					skip_special_tokens=__UpperCAmelCase   )

																					for attr in attributes_list:
																										setattr(__UpperCAmelCase ,					attr + "_id" ,					__UpperCAmelCase   )
																										self.assertEqual(getattr(__UpperCAmelCase ,					__UpperCAmelCase   ) ,					__UpperCAmelCase   )
																										self.assertEqual(getattr(__UpperCAmelCase ,					attr + "_id"   ) ,					__UpperCAmelCase   )

																										setattr(__UpperCAmelCase ,					attr + "_id" ,					__UpperCAmelCase   )
																										self.assertEqual(getattr(__UpperCAmelCase ,					__UpperCAmelCase   ) ,					__UpperCAmelCase   )
																										self.assertEqual(getattr(__UpperCAmelCase ,					attr + "_id"   ) ,					__UpperCAmelCase   )

																					setattr(__UpperCAmelCase ,					"additional_special_tokens_ids" ,					[]   )
																					self.assertListEqual(getattr(__UpperCAmelCase ,					"additional_special_tokens"   ) ,					[]   )
																					self.assertListEqual(getattr(__UpperCAmelCase ,					"additional_special_tokens_ids"   ) ,					[]   )

																					setattr(__UpperCAmelCase ,					"additional_special_tokens_ids" ,					[token_id_to_test_setters]   )
																					self.assertListEqual(getattr(__UpperCAmelCase ,					"additional_special_tokens"   ) ,					[token_to_test_setters]   )
																					self.assertListEqual(getattr(__UpperCAmelCase ,					"additional_special_tokens_ids"   ) ,					[token_id_to_test_setters]   )





