This is a classical K-Nearest-Neighbor classifier baseline.
to select the classification threshold for ith relation type, we use the value which can achieve the best F-measure on training dataset (with an additional restriction that precision should > 10%).