import unittest
import warnings
from dataclasses import dataclass

from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir


@dataclass
class _a       :

	'''simple docstring'''



	lowerCamelCase_   :      str


class _a       (	unittest.TestCase ):

	'''simple docstring'''



	def 					__UpperCAmelCase(       self   ):
			__A							:   Dict	  =				get_tests_dir("fixtures/test_sentencepiece.model"   )
			__A							:   int	  =				get_tests_dir("fixtures/test_sentencepiece_with_bytefallback.model"   )

			__A							:   Tuple	  =				FakeOriginalTokenizer(vocab_file=__UpperCAmelCase   )

			with warnings.catch_warnings(record=__UpperCAmelCase   ) as w:
					__A							:   Union[str, Any]	  =				SpmConverter(__UpperCAmelCase   )
			self.assertEqual(len(__UpperCAmelCase   )							,			0   )

			__A							:   str	  =				FakeOriginalTokenizer(vocab_file=__UpperCAmelCase   )

			with warnings.catch_warnings(record=__UpperCAmelCase   ) as w:
					__A							:   List[Any]	  =				SpmConverter(__UpperCAmelCase   )
			self.assertEqual(len(__UpperCAmelCase   )							,			1   )

			self.assertIn(
			    "The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option"
			    " which is not implemented in the fast tokenizers."							,			str(w[0].message   )							,			)






import os



def    lowerCamelCase_   (  )							->	List[str]:
		__A							:   Any	  =				0
		__A							:   Any	  =				0
		with open(os.path.dirname(_lowercase    ) + "/p022_names.txt"    ) as file:
				__A							:   int	  =				str(file.readlines()[0]    )
				__A							:   Optional[Any]	  =				name.replace("\"" ,     ""    ).split(","    )

		name.sort()
		for i in range(len(_lowercase    )    ):
				for j in name[i]:
						temp_sum += ord(_lowercase    ) - ord("A"    ) + 1
				total_sum += (i + 1) * temp_sum
				__A							:   List[Any]	  =				0
		return total_sum


if __name__ == "__main__":
					print(solution())





