from textwrap import wrap
from typing import List


def generate_character_ngrams(text: str,
                              size: int = 1,
                              drop_whitespace: bool = True) -> List[str]:
    """Generate character n-grams from raw text.

    Args:
        text (str): The source text.
        size (int): The size of the ngram.
        drop_whitespace (bool): Whether to preserve whitespace in the ngram list.

    Returns:
        List[str]: A list of ngrams
    """
    return wrap(text, size, drop_whitespace=drop_whitespace)