-
Notifications
You must be signed in to change notification settings - Fork 48
/
m_runid.c
45 lines (39 loc) · 1.17 KB
/
m_runid.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
Copyright (c) 2008 - Chris Buckley.
Permission is granted for use and modification of this file for
research, non-commercial purposes.
*/
#include "common.h"
#include "sysfunc.h"
#include "trec_eval.h"
#include "functions.h"
#include "trec_format.h"
static int
te_calc_runid(const EPI * epi, const REL_INFO * rel_info,
const RESULTS * results, const TREC_MEAS * tm, TREC_EVAL * eval);
static int te_print_runid(const EPI * epi, TREC_MEAS * tm, TREC_EVAL * eval);
/* See trec_eval.h for definition of TREC_MEAS */
TREC_MEAS te_meas_runid = { "runid",
" Runid given by results input file.\n",
te_init_meas_empty,
te_calc_runid,
te_acc_meas_empty,
te_calc_avg_meas_empty,
te_print_single_meas_empty,
te_print_runid,
NULL, -1
};
static char *runid;
static int
te_calc_runid(const EPI * epi, const REL_INFO * rel_info,
const RESULTS * results, const TREC_MEAS * tm, TREC_EVAL * eval)
{
runid = results->run_id;
return (1);
}
static int te_print_runid(const EPI * epi, TREC_MEAS * tm, TREC_EVAL * eval)
{
if (epi->summary_flag)
printf("%-22s\t%s\t%s\n", "runid", eval->qid, runid);
return (1);
}