
import inspect
import unittest

from transformers import MobileViTVaConfig
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
					import torch

					from transformers import MobileViTVaForImageClassification, MobileViTVaForSemanticSegmentation, MobileViTVaModel
					from transformers.models.mobilevitva.modeling_mobilevitva import (
					    MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
					    make_divisible,
					)


if is_vision_available():
					from PIL import Image

					from transformers import MobileViTImageProcessor







class  UpperCamelCase__		(    SCREAMING_SNAKE_CASE_   ):







	'''simple docstring'''





	def   __snake_case				(			self		):
					A__  :	List[str]         =							self.config_class(**self.inputs_dict		)
					self.parent.assertTrue(hasattr(UpperCamelCase__				,       '''width_multiplier'''		)		)







class  UpperCamelCase__		:







	'''simple docstring'''





	def __init__(			self				,       UpperCamelCase__				,       UpperCamelCase__=13				,       UpperCamelCase__=64				,       UpperCamelCase__=2				,       UpperCamelCase__=3				,       UpperCamelCase__="swish"				,       UpperCamelCase__=3				,       UpperCamelCase__=32				,       UpperCamelCase__=0.1				,       UpperCamelCase__=0.0_2				,       UpperCamelCase__=True				,       UpperCamelCase__=True				,       UpperCamelCase__=10				,       UpperCamelCase__=None				,       UpperCamelCase__=0.2_5				,       UpperCamelCase__=0.0				,       UpperCamelCase__=0.0				,       ):
					A__  :	Optional[int]         =							parent
					A__  :	List[str]         =							batch_size
					A__  :	str         =							image_size
					A__  :	Dict         =							patch_size
					A__  :	Optional[int]         =							num_channels
					A__  :	List[Any]         =							make_divisible(512 * width_multiplier				,       divisor=8		)
					A__  :	Optional[Any]         =							hidden_act
					A__  :	Any         =							conv_kernel_size
					A__  :	str         =							output_stride
					A__  :	Any         =							classifier_dropout_prob
					A__  :	Union[str, Any]         =							use_labels
					A__  :	str         =							is_training
					A__  :	Tuple         =							num_labels
					A__  :	str         =							initializer_range
					A__  :	List[Any]         =							scope
					A__  :	List[str]         =							width_multiplier
					A__  :	int         =							ffn_dropout
					A__  :	Union[str, Any]         =							attn_dropout





	def   __snake_case				(			self		):
					A__  :	Dict         =							floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]		)

					A__  :	Union[str, Any]         =							None
					A__  :	Optional[Any]         =							None
					if self.use_labels:
									A__  :	str         =							ids_tensor([self.batch_size]				,       self.num_labels		)
									A__  :	Optional[Any]         =							ids_tensor([self.batch_size, self.image_size, self.image_size]				,       self.num_labels		)

					A__  :	Any         =							self.get_config()

					return config, pixel_values, labels, pixel_labels





	def   __snake_case				(			self		):
					return MobileViTVaConfig(
					    image_size=self.image_size				,       patch_size=self.patch_size				,       num_channels=self.num_channels				,       hidden_act=self.hidden_act				,       conv_kernel_size=self.conv_kernel_size				,       output_stride=self.output_stride				,       classifier_dropout_prob=self.classifier_dropout_prob				,       initializer_range=self.initializer_range				,       width_multiplier=self.width_multiplier				,       ffn_dropout=self.ffn_dropout_prob				,       attn_dropout=self.attn_dropout_prob				,       )





	def   __snake_case				(			self				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__		):
					A__  :	str         =							MobileViTVaModel(config=UpperCamelCase__		)
					model.to(UpperCamelCase__		)
					model.eval()
					A__  :	Dict         =							model(UpperCamelCase__		)
					self.parent.assertEqual(
					    result.last_hidden_state.shape				,       (
					        self.batch_size,
					        self.last_hidden_size,
					        self.image_size // self.output_stride,
					        self.image_size // self.output_stride,
					    )				,       )





	def   __snake_case				(			self				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__		):
					A__  :	Dict         =							self.num_labels
					A__  :	List[Any]         =							MobileViTVaForImageClassification(UpperCamelCase__		)
					model.to(UpperCamelCase__		)
					model.eval()
					A__  :	Union[str, Any]         =							model(UpperCamelCase__				,       labels=UpperCamelCase__		)
					self.parent.assertEqual(result.logits.shape				,       (self.batch_size, self.num_labels)		)





	def   __snake_case				(			self				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__		):
					A__  :	Any         =							self.num_labels
					A__  :	Optional[Any]         =							MobileViTVaForSemanticSegmentation(UpperCamelCase__		)
					model.to(UpperCamelCase__		)
					model.eval()
					A__  :	Union[str, Any]         =							model(UpperCamelCase__		)
					self.parent.assertEqual(
					    result.logits.shape				,       (
					        self.batch_size,
					        self.num_labels,
					        self.image_size // self.output_stride,
					        self.image_size // self.output_stride,
					    )				,       )
					A__  :	Union[str, Any]         =							model(UpperCamelCase__				,       labels=UpperCamelCase__		)
					self.parent.assertEqual(
					    result.logits.shape				,       (
					        self.batch_size,
					        self.num_labels,
					        self.image_size // self.output_stride,
					        self.image_size // self.output_stride,
					    )				,       )





	def   __snake_case				(			self		):
					A__  :	List[str]         =							self.prepare_config_and_inputs()
					A__       ,							A__       ,							A__       ,							A__  :	Dict         =							config_and_inputs
					A__  :	Tuple         =							{'''pixel_values''': pixel_values}
					return config, inputs_dict







@require_torch
class  UpperCamelCase__		(    SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			unittest.TestCase   ):







	'''simple docstring'''
	_lowerCAmelCase							       =				(
	    (MobileViTVaModel, MobileViTVaForImageClassification, MobileViTVaForSemanticSegmentation)
	    if is_torch_available()
	    else ()
	)

	_lowerCAmelCase							       =				(
	    {
	        "feature-extraction": MobileViTVaModel,
	        "image-classification": MobileViTVaForImageClassification,
	        "image-segmentation": MobileViTVaForSemanticSegmentation,
	    }
	    if is_torch_available()
	    else {}
	)

	_lowerCAmelCase							       =				False
	_lowerCAmelCase							       =				False
	_lowerCAmelCase							       =				False
	_lowerCAmelCase							       =				False





	def   __snake_case				(			self		):
					A__  :	List[str]         =							MobileViTVaModelTester(self		)
					A__  :	int         =							MobileViTVaConfigTester(self				,       config_class=UpperCamelCase__				,       has_text_modality=UpperCamelCase__		)





	def   __snake_case				(			self		):
					self.config_tester.run_common_tests()





	@unittest.skip(reason='''MobileViTV2 does not use inputs_embeds'''		)
	def   __snake_case				(			self		):
					pass





	@unittest.skip(reason='''MobileViTV2 does not support input and output embeddings'''		)
	def   __snake_case				(			self		):
					pass





	@unittest.skip(reason='''MobileViTV2 does not output attentions'''		)
	def   __snake_case				(			self		):
					pass





	@require_torch_multi_gpu
	@unittest.skip(reason='''Got `CUDA error: misaligned address` for tests after this one being run.'''		)
	def   __snake_case				(			self		):
					pass





	@unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.'''		)
	def   __snake_case				(			self		):
					pass





	def   __snake_case				(			self		):
					A__       ,							A__  :	str         =							self.model_tester.prepare_config_and_inputs_for_common()

					for model_class in self.all_model_classes:
									A__  :	Optional[int]         =							model_class(UpperCamelCase__		)
									A__  :	Any         =							inspect.signature(model.forward		)
									# signature.parameters is an OrderedDict => so arg_names order is deterministic
									A__  :	List[str]         =							[*signature.parameters.keys()]

									A__  :	List[Any]         =							['''pixel_values''']
									self.assertListEqual(arg_names[:1]				,       UpperCamelCase__		)





	def   __snake_case				(			self		):
					A__  :	List[str]         =							self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_model(*UpperCamelCase__		)





	def   __snake_case				(			self		):
					def check_hidden_states_output(UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__		):
									A__  :	Optional[Any]         =							model_class(UpperCamelCase__		)
									model.to(UpperCamelCase__		)
									model.eval()

									with torch.no_grad():
													A__  :	Tuple         =							model(**self._prepare_for_class(UpperCamelCase__				,       UpperCamelCase__		)		)

									A__  :	Union[str, Any]         =							outputs.hidden_states

									A__  :	Any         =							5
									self.assertEqual(len(UpperCamelCase__		)				,       UpperCamelCase__		)

									# MobileViTV2's feature maps are of shape (batch_size, num_channels, height, width)
									# with the width and height being successively divided by 2.
									A__  :	str         =							2
									for i in range(len(UpperCamelCase__		)		):
													self.assertListEqual(
													    list(hidden_states[i].shape[-2:]		)				,       [self.model_tester.image_size // divisor, self.model_tester.image_size // divisor]				,       )
													divisor *= 2

									self.assertEqual(self.model_tester.output_stride				,       divisor // 2		)

					A__       ,							A__  :	List[Any]         =							self.model_tester.prepare_config_and_inputs_for_common()

					for model_class in self.all_model_classes:
									A__  :	Optional[Any]         =							True
									check_hidden_states_output(UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__		)

									# check that output_hidden_states also work using config
									del inputs_dict["output_hidden_states"]
									A__  :	List[Any]         =							True

									check_hidden_states_output(UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__		)





	def   __snake_case				(			self		):
					A__  :	int         =							self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_for_image_classification(*UpperCamelCase__		)





	def   __snake_case				(			self		):
					A__  :	int         =							self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_for_semantic_segmentation(*UpperCamelCase__		)





	@slow
	def   __snake_case				(			self		):
					for model_name in MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
									A__  :	Optional[int]         =							MobileViTVaModel.from_pretrained(UpperCamelCase__		)
									self.assertIsNotNone(UpperCamelCase__		)




def 				SCREAMING_SNAKE_CASE     (      ) ->       Dict:

				"""simple docstring"""







				A__  :	str         =							Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''       )
				return image







@require_torch
@require_vision
class  UpperCamelCase__		(    unittest.TestCase   ):







	'''simple docstring'''





	@cached_property
	def   __snake_case				(			self		):
					return (
					    MobileViTImageProcessor.from_pretrained('''apple/mobilevitv2-1.0-imagenet1k-256'''		)
					    if is_vision_available()
					    else None
					)





	@slow
	def   __snake_case				(			self		):
					A__  :	int         =							MobileViTVaForImageClassification.from_pretrained('''apple/mobilevitv2-1.0-imagenet1k-256'''		).to(
					    UpperCamelCase__		)

					A__  :	Dict         =							self.default_image_processor
					A__  :	List[Any]         =							prepare_img()
					A__  :	List[str]         =							image_processor(images=UpperCamelCase__				,       return_tensors='''pt'''		).to(UpperCamelCase__		)

					# forward pass
					with torch.no_grad():
									A__  :	List[Any]         =							model(**UpperCamelCase__		)

					# verify the logits
					A__  :	int         =							torch.Size((1, 1000)		)
					self.assertEqual(outputs.logits.shape				,       UpperCamelCase__		)

					A__  :	List[Any]         =							torch.tensor([-1.63_36e00, -7.32_04e-02, -5.18_83e-01]		).to(UpperCamelCase__		)

					self.assertTrue(torch.allclose(outputs.logits[0, :3]				,       UpperCamelCase__				,       atol=1e-4		)		)





	@slow
	def   __snake_case				(			self		):
					A__  :	int         =							MobileViTVaForSemanticSegmentation.from_pretrained('''shehan97/mobilevitv2-1.0-voc-deeplabv3'''		)
					A__  :	int         =							model.to(UpperCamelCase__		)

					A__  :	str         =							MobileViTImageProcessor.from_pretrained('''shehan97/mobilevitv2-1.0-voc-deeplabv3'''		)

					A__  :	List[str]         =							prepare_img()
					A__  :	int         =							image_processor(images=UpperCamelCase__				,       return_tensors='''pt'''		).to(UpperCamelCase__		)

					# forward pass
					with torch.no_grad():
									A__  :	Dict         =							model(**UpperCamelCase__		)
					A__  :	Any         =							outputs.logits

					# verify the logits
					A__  :	Any         =							torch.Size((1, 21, 32, 32)		)
					self.assertEqual(logits.shape				,       UpperCamelCase__		)

					A__  :	Optional[int]         =							torch.tensor(
					    [
					        [[7.0_8_6_3, 7.1_5_2_5, 6.8_2_0_1], [6.6_9_3_1, 6.8_7_7_0, 6.8_9_3_3], [6.2_9_7_8, 7.0_3_6_6, 6.9_6_3_6]],
					        [[-3.7_1_3_4, -3.6_7_1_2, -3.6_6_7_5], [-3.5_8_2_5, -3.3_5_4_9, -3.4_7_7_7], [-3.3_4_3_5, -3.3_9_7_9, -3.2_8_5_7]],
					        [[-2.9_3_2_9, -2.8_0_0_3, -2.7_3_6_9], [-3.0_5_6_4, -2.4_7_8_0, -2.0_2_0_7], [-2.6_8_8_9, -1.9_2_9_8, -1.7_6_4_0]],
					    ]				,       device=UpperCamelCase__				,       )

					self.assertTrue(torch.allclose(logits[0, :3, :3, :3]				,       UpperCamelCase__				,       atol=1e-4		)		)





	@slow
	def   __snake_case				(			self		):
					A__  :	str         =							MobileViTVaForSemanticSegmentation.from_pretrained('''shehan97/mobilevitv2-1.0-voc-deeplabv3'''		)
					A__  :	Tuple         =							model.to(UpperCamelCase__		)

					A__  :	int         =							MobileViTImageProcessor.from_pretrained('''shehan97/mobilevitv2-1.0-voc-deeplabv3'''		)

					A__  :	Tuple         =							prepare_img()
					A__  :	Optional[Any]         =							image_processor(images=UpperCamelCase__				,       return_tensors='''pt'''		).to(UpperCamelCase__		)

					# forward pass
					with torch.no_grad():
									A__  :	Union[str, Any]         =							model(**UpperCamelCase__		)

					A__  :	Optional[int]         =							outputs.logits.detach().cpu()

					A__  :	List[str]         =							image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase__				,       target_sizes=[(50, 60)]		)
					A__  :	Union[str, Any]         =							torch.Size((50, 60)		)
					self.assertEqual(segmentation[0].shape				,       UpperCamelCase__		)

					A__  :	List[str]         =							image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase__		)
					A__  :	str         =							torch.Size((32, 32)		)
					self.assertEqual(segmentation[0].shape				,       UpperCamelCase__		)

import sacrebleu as scb
from packaging import version
from sacrebleu import TER

import datasets


_SCREAMING_SNAKE_CASE    :      Union[str, Any]          =			'\\n@inproceedings{snover-etal-2006-study,\n    title = "A Study of Translation Edit Rate with Targeted Human Annotation",\n    author = "Snover, Matthew  and\n      Dorr, Bonnie  and\n      Schwartz, Rich  and\n      Micciulla, Linnea  and\n      Makhoul, John",\n    booktitle = "Proceedings of the 7th Conference of the Association for Machine Translation in the Americas: Technical Papers",\n    month = aug # " 8-12",\n    year = "2006",\n    address = "Cambridge, Massachusetts, USA",\n    publisher = "Association for Machine Translation in the Americas",\n    url = "https://aclanthology.org/2006.amta-papers.25",\n    pages = "223--231",\n}\n@inproceedings{post-2018-call,\n    title = "A Call for Clarity in Reporting {BLEU} Scores",\n    author = "Post, Matt",\n    booktitle = "Proceedings of the Third Conference on Machine Translation: Research Papers",\n    month = oct,\n    year = "2018",\n    address = "Belgium, Brussels",\n    publisher = "Association for Computational Linguistics",\n    url = "https://www.aclweb.org/anthology/W18-6319",\n    pages = "186--191",\n}\n'

_SCREAMING_SNAKE_CASE    :      Tuple          =			'\\nTER (Translation Edit Rate, also called Translation Error Rate) is a metric to quantify the edit operations that a\nhypothesis requires to match a reference translation. We use the implementation that is already present in sacrebleu\n(https://github.com/mjpost/sacreBLEU#ter), which in turn is inspired by the TERCOM implementation, which can be found\nhere: https://github.com/jhclark/tercom.\n\nThe implementation here is slightly different from sacrebleu in terms of the required input format. The length of\nthe references and hypotheses lists need to be the same, so you may need to transpose your references compared to\nsacrebleu\'s required input format. See https://github.com/huggingface/datasets/issues/3154#issuecomment-950746534\n\nSee the README.md file at https://github.com/mjpost/sacreBLEU#ter for more information.\n'

_SCREAMING_SNAKE_CASE    :      Optional[Any]          =			'\nProduces TER scores alongside the number of edits and reference length.\n\nArgs:\n    predictions (list of str): The system stream (a sequence of segments).\n    references (list of list of str): A list of one or more reference streams (each a sequence of segments).\n    normalized (boolean): If `True`, applies basic tokenization and normalization to sentences. Defaults to `False`.\n    ignore_punct (boolean): If `True`, applies basic tokenization and normalization to sentences. Defaults to `False`.\n    support_zh_ja_chars (boolean): If `True`, tokenization/normalization supports processing of Chinese characters,\n                                    as well as Japanese Kanji, Hiragana, Katakana, and Phonetic Extensions of Katakana.\n                                    Only applies if `normalized = True`. Defaults to `False`.\n    case_sensitive (boolean): If `False`, makes all predictions and references lowercase to ignore differences in case. Defaults to `False`.\n\nReturns:\n    \'score\' (float): TER score (num_edits / sum_ref_lengths * 100)\n    \'num_edits\' (int): The cumulative number of edits\n    \'ref_length\' (float): The cumulative average reference length\n\nExamples:\n    Example 1:\n        >>> predictions = ["does this sentence match??",\n        ...                     "what about this sentence?",\n        ...                     "What did the TER metric user say to the developer?"]\n        >>> references = [["does this sentence match", "does this sentence match!?!"],\n        ...             ["wHaT aBoUt ThIs SeNtEnCe?", "wHaT aBoUt ThIs SeNtEnCe?"],\n        ...             ["Your jokes are...", "...TERrible"]]\n        >>> ter = datasets.load_metric("ter")\n        >>> results = ter.compute(predictions=predictions,\n        ...                         references=references,\n        ...                         case_sensitive=True)\n        >>> print(results)\n        {\'score\': 150.0, \'num_edits\': 15, \'ref_length\': 10.0}\n\n    Example 2:\n        >>> predictions = ["does this sentence match??",\n        ...                     "what about this sentence?"]\n        >>> references = [["does this sentence match", "does this sentence match!?!"],\n        ...             ["wHaT aBoUt ThIs SeNtEnCe?", "wHaT aBoUt ThIs SeNtEnCe?"]]\n        >>> ter = datasets.load_metric("ter")\n        >>> results = ter.compute(predictions=predictions,\n        ...                         references=references,\n        ...                         case_sensitive=True)\n        >>> print(results)\n        {\'score\': 62.5, \'num_edits\': 5, \'ref_length\': 8.0}\n\n    Example 3:\n        >>> predictions = ["does this sentence match??",\n        ...                     "what about this sentence?"]\n        >>> references = [["does this sentence match", "does this sentence match!?!"],\n        ...             ["wHaT aBoUt ThIs SeNtEnCe?", "wHaT aBoUt ThIs SeNtEnCe?"]]\n        >>> ter = datasets.load_metric("ter")\n        >>> results = ter.compute(predictions=predictions,\n        ...                         references=references,\n        ...                         normalized=True,\n        ...                         case_sensitive=True)\n        >>> print(results)\n        {\'score\': 57.14285714285714, \'num_edits\': 6, \'ref_length\': 10.5}\n\n    Example 4:\n        >>> predictions = ["does this sentence match??",\n        ...                     "what about this sentence?"]\n        >>> references = [["does this sentence match", "does this sentence match!?!"],\n        ...             ["wHaT aBoUt ThIs SeNtEnCe?", "wHaT aBoUt ThIs SeNtEnCe?"]]\n        >>> ter = datasets.load_metric("ter")\n        >>> results = ter.compute(predictions=predictions,\n        ...                         references=references,\n        ...                         ignore_punct=True,\n        ...                         case_sensitive=False)\n        >>> print(results)\n        {\'score\': 0.0, \'num_edits\': 0, \'ref_length\': 8.0}\n\n    Example 5:\n        >>> predictions = ["does this sentence match??",\n        ...                    "what about this sentence?",\n        ...                    "What did the TER metric user say to the developer?"]\n        >>> references = [["does this sentence match", "does this sentence match!?!"],\n        ...             ["wHaT aBoUt ThIs SeNtEnCe?", "wHaT aBoUt ThIs SeNtEnCe?"],\n        ...             ["Your jokes are...", "...TERrible"]]\n        >>> ter = datasets.load_metric("ter")\n        >>> results = ter.compute(predictions=predictions,\n        ...                         references=references,\n        ...                         ignore_punct=True,\n        ...                         case_sensitive=False)\n        >>> print(results)\n        {\'score\': 100.0, \'num_edits\': 10, \'ref_length\': 10.0}\n'







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







	'''simple docstring'''





	def   __snake_case				(			self		):
					if version.parse(scb.__version__		) < version.parse('''1.4.12'''		):
									raise ImportWarning(
									    '''To use `sacrebleu`, the module `sacrebleu>=1.4.12` is required, and the current version of `sacrebleu` doesn\'t match this condition.\n'''
									    '''You can install it with `pip install "sacrebleu>=1.4.12"`.'''		)
					return datasets.MetricInfo(
					    description=_DESCRIPTION				,       citation=_CITATION				,       homepage='''http://www.cs.umd.edu/~snover/tercom/'''				,       inputs_description=_KWARGS_DESCRIPTION				,       features=datasets.Features(
					        {
					            '''predictions''': datasets.Value('''string'''				,       id='''sequence'''		),
					            '''references''': datasets.Sequence(datasets.Value('''string'''				,       id='''sequence'''		)				,       id='''references'''		),
					        }		)				,       codebase_urls=['''https://github.com/mjpost/sacreBLEU#ter''']				,       reference_urls=[
					        '''https://github.com/jhclark/tercom''',
					    ]				,       )





	def   __snake_case				(			self				,       UpperCamelCase__				,       UpperCamelCase__				,       UpperCamelCase__ = False				,       UpperCamelCase__ = False				,       UpperCamelCase__ = False				,       UpperCamelCase__ = False				,       ):
					A__  :	List[Any]         =							len(references[0]		)
					if any(len(UpperCamelCase__		) != references_per_prediction for refs in references		):
									raise ValueError('''Sacrebleu requires the same number of references for each prediction'''		)
					A__  :	Dict         =							[[refs[i] for refs in references] for i in range(UpperCamelCase__		)]

					A__  :	Optional[Any]         =							TER(
					    normalized=UpperCamelCase__				,       no_punct=UpperCamelCase__				,       asian_support=UpperCamelCase__				,       case_sensitive=UpperCamelCase__				,       )
					A__  :	str         =							sb_ter.corpus_score(UpperCamelCase__				,       UpperCamelCase__		)

					return {"score": output.score, "num_edits": output.num_edits, "ref_length": output.ref_length}