





'''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     __lowerCAmelCase					(   __magic_name__						,						unittest.TestCase			):






       """simple docstring"""
       _snake_case     :					Optional[int]						    =   RoFormerTokenizer
       _snake_case     :					str						    =   RoFormerTokenizerFast
       _snake_case     :					List[Any]						    =   True
       _snake_case     :					int						    =   True





       def snake_case__						(							self       :		int					)   ->					Optional[int]:

            '''simple docstring'''




            super().setUp()





       def snake_case__						(							self       :		int	,			**lowerCAmelCase__       :		Any					)   ->					List[Any]:

            '''simple docstring'''




            return self.tokenizer_class.from_pretrained('''junnyu/roformer_chinese_base'''	,			**lowerCAmelCase__					)





       def snake_case__						(							self       :		List[Any]	,			**lowerCAmelCase__       :		Dict					)   ->					List[Any]:

            '''simple docstring'''




            return self.rust_tokenizer_class.from_pretrained('''junnyu/roformer_chinese_base'''	,			**lowerCAmelCase__					)





       def snake_case__						(							self       :		List[Any]					)   ->					int:

            '''simple docstring'''




            _UpperCamelCase       =	'''永和服装饰品有限公司,今天天气非常好'''
            _UpperCamelCase       =	'''永和 服装 饰品 有限公司 , 今 天 天 气 非常 好'''
            return input_text, output_text





       def snake_case__						(							self       :		int					)   ->					Optional[int]:

            '''simple docstring'''




            _UpperCamelCase       =	self.get_tokenizer()
            _UpperCamelCase   ,    _UpperCamelCase       =	self.get_chinese_input_output_texts()
            _UpperCamelCase       =	tokenizer.tokenize(lowerCAmelCase__					)

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

            _UpperCamelCase       =	tokens + [tokenizer.unk_token]
            _UpperCamelCase       =	[22943, 21332, 34431, 45904, 117, 306, 1231, 1231, 2653, 33994, 1266, 100]
            self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCAmelCase__					)	,			lowerCAmelCase__					)





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

            '''simple docstring'''




            _UpperCamelCase       =	self.get_rust_tokenizer()
            _UpperCamelCase   ,    _UpperCamelCase       =	self.get_chinese_input_output_texts()
            _UpperCamelCase       =	tokenizer.tokenize(lowerCAmelCase__					)
            self.assertListEqual(lowerCAmelCase__	,			output_text.split()					)
            _UpperCamelCase       =	tokens + [tokenizer.unk_token]
            _UpperCamelCase       =	[22943, 21332, 34431, 45904, 117, 306, 1231, 1231, 2653, 33994, 1266, 100]
            self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCAmelCase__					)	,			lowerCAmelCase__					)





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

            '''simple docstring'''




            pass





       def snake_case__						(							self       :		Optional[int]					)   ->					int:

            '''simple docstring'''




            pass







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

            '''simple docstring'''




            pass










'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey







def  a__    (    lowercase :					str				)		->		Optional[int]:





     """simple docstring"""

     _UpperCamelCase   ,    _UpperCamelCase       =	img.shape[0], img.shape[1]

     # converting each pixel's color to its negative
     for i in range(lowercase				):
          for j in range(lowercase				):
               _UpperCamelCase       =	[255, 255, 255] - img[i][j]

     return img


if __name__ == "__main__":
   # read original image
   lowercase__						:      Optional[int]	=    imread('image_data/lena.jpg', 1)

   # convert to its negative
   lowercase__						:      Union[str, Any]	=    convert_to_negative(img)

   # show result image
   imshow('negative of original image', img)
   waitKey(0)
   destroyAllWindows()



