



def 	UpperCAmelCase__      (      UpperCAmelCase__ :str ,					UpperCAmelCase__ :int					):






 '''simple docstring'''

 return [sentence[i : i + ngram_size] for i in range(len(UpperCAmelCase__					) - ngram_size + 1					)]


if __name__ == "__main__":
     from doctest import testmod

     testmod()






import os
import tempfile
import unittest

from transformers.models.marian.convert_marian_tatoeba_to_pytorch import DEFAULT_REPO, TatoebaConverter
from transformers.testing_utils import slow
from transformers.utils import cached_property



@unittest.skipUnless(os.path.exists(UpperCAmelCase__	),   '''Tatoeba directory does not exist.'''	)
class 		_lowercase		(       unittest.TestCase	):

   @cached_property
   def 		A							(      self			:       List[str]							)       ->				int:


    """simple docstring"""






    a						=		tempfile.mkdtemp()
    return TatoebaConverter(save_dir=__lowerCAmelCase							)

   @slow
   def 		A							(      self			:       Optional[int]							)       ->				List[str]:


    """simple docstring"""






    self.resolver.convert_models(["heb-eng"]							)




   @slow
   def 		A							(      self			:       Dict							)       ->				Any:


    """simple docstring"""






    a		,  a						=		self.resolver.write_model_card("opus-mt-he-en"							,   dry_run=__lowerCAmelCase							)
    assert mmeta["long_pair"] == "heb-eng"

