nltk.binary_distance()

nltk.binary_distance(label1, label2)[source]

Simple equality test.

0.0 if the labels are identical, 1.0 if they are different.

>>> from nltk.metrics import binary_distance
>>> binary_distance(1,1)
0.0
>>> binary_distance(1,3)
1.0