def map_string(affix_string: str, punctuation: str, whitespace_only: bool = False) -> str:
    """Turn affix string into type char representation. Types are 'w' for non-whitespace char,
    and 's' for whitespace char.

    :param affix_string: a string
    :type: str
    :param punctuation: the set of characters to treat as punctuation
    :type punctuation: str
    :param whitespace_only: whether to treat only whitespace as word boundary or also include (some) punctuation
    :type whitespace_only: bool
    :return: the type char representation
    :rtype: str
    """
    if whitespace_only:
        return "".join(["s" if char == " " else "w" for char in affix_string])
    else:
        return "".join(["s" if char == " " or char in punctuation else "w" for char in affix_string])