





'''simple docstring'''


import unittest

from transformers import RoFormerTokenizer, RoFormerTokenizerFast
from transformers.testing_utils import require_rjieba, require_tokenizers

from ...test_tokenization_common import TokenizerTesterMixin
@require_rjieba
@require_tokenizers
class       a_   (				_lowerCAmelCase	,						unittest.TestCase							):
     __A      =			RoFormerTokenizer
     __A      =			RoFormerTokenizerFast
     __A      =			True
     __A      =			True





     def 							lowercase__      ( self		:					Tuple						):





        """simple docstring"""




        super().setUp()





     def 							lowercase__      ( self		:					List[str]	,      **lowercase		:					List[Any]						):





        """simple docstring"""




        return self.tokenizer_class.from_pretrained("junnyu/roformer_chinese_base"	,      **lowercase						)





     def 							lowercase__      ( self		:					Optional[int]	,      **lowercase		:					Dict						):





        """simple docstring"""




        return self.rust_tokenizer_class.from_pretrained("junnyu/roformer_chinese_base"	,      **lowercase						)





     def 							lowercase__      ( self		:					str						):





        """simple docstring"""




        lowercase_			:Union[str, Any]    			= "永和服装饰品有限公司,今天天气非常好"
        lowercase_			:List[str]    			= "永和 服装 饰品 有限公司 , 今 天 天 气 非常 好"
        return input_text, output_text





     def 							lowercase__      ( self		:					Union[str, Any]						):





        """simple docstring"""




        lowercase_			:List[Any]    			= self.get_tokenizer()
        lowercase_			,							lowercase_			:str    			= self.get_chinese_input_output_texts()
        lowercase_			:int    			= tokenizer.tokenize(lowercase						)

        self.assertListEqual(lowercase	,      output_text.split()						)

        lowercase_			:int    			= tokens + [tokenizer.unk_token]
        lowercase_			:Tuple    			= [22_943, 21_332, 34_431, 45_904, 117, 306, 1_231, 1_231, 2_653, 33_994, 1_266, 100]
        self.assertListEqual(tokenizer.convert_tokens_to_ids(lowercase						)	,      lowercase						)





     def 							lowercase__      ( self		:					Tuple						):





        """simple docstring"""




        lowercase_			:Dict    			= self.get_rust_tokenizer()
        lowercase_			,							lowercase_			:List[str]    			= self.get_chinese_input_output_texts()
        lowercase_			:Optional[Any]    			= tokenizer.tokenize(lowercase						)
        self.assertListEqual(lowercase	,      output_text.split()						)
        lowercase_			:List[Any]    			= tokens + [tokenizer.unk_token]
        lowercase_			:Dict    			= [22_943, 21_332, 34_431, 45_904, 117, 306, 1_231, 1_231, 2_653, 33_994, 1_266, 100]
        self.assertListEqual(tokenizer.convert_tokens_to_ids(lowercase						)	,      lowercase						)





     def 							lowercase__      ( self		:					Tuple						):





        """simple docstring"""




        pass





     def 							lowercase__      ( self		:					str						):





        """simple docstring"""




        pass







     def 							lowercase__      ( self		:					Optional[int]						):





        """simple docstring"""




        pass









'''simple docstring'''


def 							UpperCAmelCase_  (						__lowerCamelCase					:					int	,__lowerCamelCase					:					int ):
   return int((input_a, input_a).count(0 ) == 0 )
def 							UpperCAmelCase_  (						):
   assert and_gate(0	,0 ) == 0
   assert and_gate(0	,1 ) == 0
   assert and_gate(1	,0 ) == 0
   assert and_gate(1	,1 ) == 1


if __name__ == "__main__":
 test_and_gate()
 print(and_gate(1, 0))
 print(and_gate(0, 0))
 print(and_gate(0, 1))
 print(and_gate(1, 1))


