
"""simple docstring"""





from collections import Counter
from timeit import timeit



def       lowerCamelCase__		(			__snake_case = "",     )							->		bool:


					"""simple docstring"""





					return sum(c % 2 for c in Counter(input_str.replace(''' ''',     ''''''	).lower()	).values()	) < 2



def       lowerCamelCase__		(			__snake_case = ""	)							->		bool:


					"""simple docstring"""





					if len(__snake_case	) == 0:
										return True
					_UpperCamelCase							 =  input_str.replace(''' ''',     ''''''	).lower()
					# character_freq_dict: Stores the frequency of every character in the input string
					_UpperCamelCase							 =  {}

					for character in lower_case_input_str:
										_UpperCamelCase							 =  character_freq_dict.get(__snake_case,     0	) + 1
					_UpperCamelCase							 =  0

					for character_count in character_freq_dict.values():
										if character_count % 2:
															odd_char += 1
					if odd_char > 1:
										return False
					return True



def       lowerCamelCase__		(			__snake_case = ""	)							->		None:


					"""simple docstring"""





					print('''\nFor string = ''',     __snake_case,     ''':'''	)
					print(
					    '''> can_string_be_rearranged_as_palindrome_counter()''',     '''\tans =''',     can_string_be_rearranged_as_palindrome_counter(__snake_case	),     '''\ttime =''',     timeit(
					        '''z.can_string_be_rearranged_as_palindrome_counter(z.check_str)''',     setup='''import __main__ as z''',     ),     '''seconds''',     )
					print(
					    '''> can_string_be_rearranged_as_palindrome()''',     '''\tans =''',     can_string_be_rearranged_as_palindrome(__snake_case	),     '''\ttime =''',     timeit(
					        '''z.can_string_be_rearranged_as_palindrome(z.check_str)''',     setup='''import __main__ as z''',     ),     '''seconds''',     )


if __name__ == "__main__":
				_a														=		input(
				    """Enter string to determine if it can be rearranged as a palindrome or not: """
				).strip()
				benchmark(check_str)
				_a														=		can_string_be_rearranged_as_palindrome_counter(check_str)
				print(F"""{check_str} can {"" if status else "not "}be rearranged as a palindrome""")








"""simple docstring"""





import datasets


_a														=		"""\
@InProceedings{conneau2018xnli,
  author = \"Conneau, Alexis
                 and Rinott, Ruty
                 and Lample, Guillaume
                 and Williams, Adina
                 and Bowman, Samuel R.
                 and Schwenk, Holger
                 and Stoyanov, Veselin\",
  title = \"XNLI: Evaluating Cross-lingual Sentence Representations\",
  booktitle = \"Proceedings of the 2018 Conference on Empirical Methods
               in Natural Language Processing\",
  year = \"2018\",
  publisher = \"Association for Computational Linguistics\",
  location = \"Brussels, Belgium\",
}
"""

_a														=		"""\
XNLI is a subset of a few thousand examples from MNLI which has been translated
into a 14 different languages (some low-ish resource). As with MNLI, the goal is
to predict textual entailment (does sentence A imply/contradict/neither sentence
B) and is a classification task (given two sentences, predict one of three
labels).
"""

_a														=		"""
Computes XNLI score which is just simple accuracy.
Args:
    predictions: Predicted labels.
    references: Ground truth labels.
Returns:
    'accuracy': accuracy
Examples:

    >>> predictions = [0, 1]
    >>> references = [0, 1]
    >>> xnli_metric = datasets.load_metric(\"xnli\")
    >>> results = xnli_metric.compute(predictions=predictions, references=references)
    >>> print(results)
    {'accuracy': 1.0}
"""



def       lowerCamelCase__		(			__snake_case,     __snake_case	)							->		str:


					"""simple docstring"""





					return (preds == labels).mean()






@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION      ,     _KWARGS_DESCRIPTION	)
class     _UpperCAmelCase(    datasets.Metric	):



		def 						UpperCAmelCase							(					self)       ->       Dict:






							'''simple docstring'''
							return datasets.MetricInfo(
							    description=_DESCRIPTION				,		citation=_CITATION				,		inputs_description=_KWARGS_DESCRIPTION				,		features=datasets.Features(
							        {
							            '''predictions''': datasets.Value('''int64''' if self.config_name != '''sts-b''' else '''float32'''),
							            '''references''': datasets.Value('''int64''' if self.config_name != '''sts-b''' else '''float32'''),
							        })				,		codebase_urls=[]				,		reference_urls=[]				,		format='''numpy'''				,		)




		def 						UpperCAmelCase							(					self				,		__a				,		__a)       ->       Dict:






							'''simple docstring'''
							return {"accuracy": simple_accuracy(__a				,		__a)}






