def yesno(value):
    """Convert 0/1 or True/False to 'yes'/'no' strings.
       Weka/LibSVM doesn't like labels that are numbers, so this is
       helpful for that.
    """
    if value == 1 or value == True:
        return 'yes'
    return 'no'