mpkato commited on
Commit
a0b6a05
·
verified ·
1 Parent(s): 03a267c

Add evaluation note on query-document overlap in Rev2Rev

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -123,6 +123,21 @@ df[["query-id", "iter", "corpus-id", "score"]].to_csv(
123
 
124
  Train / validation / test split at amendment-event granularity (~1/3 each, inherited from the underlying construction pipeline). Same-event queries from both tasks are guaranteed to be in the same split.
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  ## Licenses
127
 
128
  - **EU subset**: CC BY 4.0 (EUR-Lex)
 
123
 
124
  Train / validation / test split at amendment-event granularity (~1/3 each, inherited from the underlying construction pipeline). Same-event queries from both tasks are guaranteed to be in the same split.
125
 
126
+ ## Evaluation note: query–document overlap (Rev2Rev)
127
+
128
+ In Rev2Rev, queries are articles drawn from the corpus being searched, so the query document itself appears as a candidate at retrieval time and is trivially matched. Rebuilding a per-query corpus (with the query document excluded) is expensive — a separate index per query — so we recommend the simpler workaround: retrieve against the full corpus, then post-filter the TREC-format run file by dropping rows where `qid == docid` and promoting the subsequent ranks to fill the gap.
129
+
130
+ ```python
131
+ import pandas as pd
132
+ cols = ["qid", "Q0", "docid", "rank", "score", "tag"]
133
+ run = pd.read_csv("run.trec", sep=r"\s+", names=cols, dtype={"qid": str, "docid": str})
134
+ run = run[run["qid"] != run["docid"]].copy()
135
+ run["rank"] = run.groupby("qid").cumcount() + 1
136
+ run.to_csv("run.filtered.trec", sep=" ", header=False, index=False)
137
+ ```
138
+
139
+ This does not affect Rat2Rev, where queries are amendment rationales rather than corpus articles.
140
+
141
  ## Licenses
142
 
143
  - **EU subset**: CC BY 4.0 (EUR-Lex)