def parse_boolean(value_string):
    """
    Determine the boolean value of the input string.

    "yes", "no", "true" and "false" are recognized (case-insensitive).

    :param value_string: input string to be parsed.

    :return: boolean value based on input string
    :raises ValueError: if the string is not recognized as a boolean
    """
    value_string = value_string.lower().strip()
    if value_string in ('yes', 'true'):
        return True
    if value_string in ('no', 'false'):
        return False
    raise ValueError('Invalid value for conversion: ' + value_string)
