https en wikipedia orgwikingram create ngrams from a sentence createngrami am a sentence 2 i a am m a a s se en nt te en nc ce createngrami am an nlper 2 i a am m a an n n nl lp pe er createngramthis is short 50 create ngrams from a sentence create_ngram i am a sentence 2 i a am m a a s se en nt te en nc ce create_ngram i am an nlper 2 i a am m a an n n nl lp pe er create_ngram this is short 50
def create_ngram(sentence: str, ngram_size: int) -> list[str]:
    
    return [sentence[i : i + ngram_size] for i in range(len(sentence) - ngram_size + 1)]


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

    testmod()