def convert_to_bool(text):
    """ Convert a few common variations of "true" and "false" to boolean

    :param text: string to test
    :return: boolean
    :raises: ValueError
    """
    try:
        return bool(int(text))
    except:
        pass
    text = str(text).lower()
    if text == 'true':
        return True
    if text == 'yes':
        return True
    if text == 'false':
        return False
    if text == 'no':
        return False
    raise ValueError
