def evaluate_api_jaccard(sentence, to_print):
    p1 = rosette_API.get_label(sentence=sentence)
    p2 = aylien_API.get_label(sentence)
    jaccard_val = jaccard(p1, p2)

    if to_print:
        print jaccard_val, jaccard_val < jaccard_threshold

    return jaccard_val < jaccard_threshold, p1, p2
def evaluate_api(sentence, to_print):
    p1 = rosette_API.get_label(sentence=sentence)[0]
    p2 = aylien_API.get_label(sentence)[0]
    val = False
    print " "
    if (p1[0] != p2[0]):
        val = True, p1, p2
        if to_print:
            print "Case 1"
    elif (p1[0] == p2[0] and abs(p1[1] - p2[1]) > 0.5):
        val = True, p1, p2
        if to_print:
            print "Case 2"
    else:
        val = False, p1, p2
        if to_print:
            print "Case 3"

    print p1, p2, val
    print " "
    return val