






def 				__lowerCamelCase     (							__lowerCAmelCase							:					str					,							__lowerCAmelCase							:					int							)     ->  list[str]:
   return [sentence[i : i + ngram_size] for i in range(len(__lowerCAmelCase							) - ngram_size + 1							)]


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

       testmod()











import re

from filelock import FileLock


try:
       import nltk

       UpperCamelCase    							=      True
except (ImportError, ModuleNotFoundError):
       UpperCamelCase    							=      False

if NLTK_AVAILABLE:
       with FileLock('.lock') as lock:
              nltk.download('punkt', quiet=True)


def 				__lowerCamelCase     (							__lowerCAmelCase							:					str							)     ->  str:
   re.sub("""<n>"""					,							""""""					,							__lowerCAmelCase							)  # remove pegasus newline char
   assert NLTK_AVAILABLE, "nltk must be installed to separate newlines between sentences. (pip install nltk)"
   return "\n".join(nltk.sent_tokenize(__lowerCAmelCase							)							)



