from typing import List


def _get_characters(sentence: str, whitespace: bool) -> List[str]:
    """Split sentence into individual characters.

    Args:
        sentence: An input sentence to split.
        whitespace: An indication whether to keep whitespaces during character n-gram extraction.

    Return:
        A list of separated characters.
    """
    if whitespace:
        return list(sentence)
    return list(sentence.strip().replace(" ", ""))