def infer_pos_label(neg_label=None):
<EOL>if neg_label is None:<EOL><INDENT>return True<EOL><DEDENT>typ = type(neg_label)<EOL>try:<EOL><INDENT>neg_label = int(float(neg_label))<EOL>if neg_label in (<NUM_LIT:0>, <NUM_LIT:1>):<EOL><INDENT>return typ(int(not neg_label))<EOL><DEDENT>if neg_label < <NUM_LIT:0>:<EOL><INDENT>return typ(-neg_label)<EOL><DEDENT>return typ(neg_label + <NUM_LIT:1>)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>neg_label = stringify(neg_label).strip()<EOL><DEDENT>for xform, label_dict in zip((lambda x: x, lambda x: x, str.lower, str.lower,),<EOL>(POS_LABELS, POS_LABELS_INVERSE, POS_LABELS_LOWER, POS_LABELS_LOWER_INVERSE)):<EOL><INDENT>try:<EOL><INDENT>return typ(label_dict[xform(neg_label)])<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return '<STR_LIT:P>'<EOL>
Try to guess a positive classification label from a negative label
    Basis for an NLP function to find the "opposite" of a string
    yes->no, true->false, etc)
    >>> [infer_pos_label(x) for x in ('1', '-1', '0', '2', 1, 0, 'F', 'False', False, True)]
    ['0', '1', '1', '3', 0, 1, 'T', 'True', True, False]