Changed ccrf code to 4-space indentation
@@ -10,6 +10,7 @@ topic_list = [
'690'
]
+
def submission(origin_file, runtag, output_file):
with open(output_file, 'a') as fout, open(origin_file, 'r') as fin:
for line in fin:
@@ -19,6 +20,7 @@ def submission(origin_file, runtag, output_file):
data[-1] = runtag
fout.write(' '.join(data) + '\n')
+
def ensemble(folder, ratio, num_ensemble, runtag, output):
ensemble_dict = {}
if num_ensemble == 1:
@@ -47,6 +49,7 @@ def ensemble(folder, ratio, num_ensemble, runtag, output):
key=lambda x: -x[1])):
f.write('{} Q0 {} {} {} {}\n'.format(topic, docid, rank + 1, score, runtag))
+
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--rank-file", type=str,
