def main():
"""
Train a classifier based on all the measures, to discriminate hypernymy from one other single relation.
"""
# Get the arguments
args = docopt("""Calculate the Average Precision (AP) at k for every hyper-other relation in the dataset.
Usage:
ap_on_each_relation.py
= the test set result file.
= the test set containing the original relations.
= the cutoff; if it is equal to zero, all the rank is considered.
""")
test_set_file = args['']
test_results_file = args['']
cutoff = int(args[''])
# Load the test set
print 'Loading the dataset...'
test_set, relations = load_dataset(test_set_file + '.test')
hyper_relation = 'hyper'
for other_re