Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-z committed Jun 21, 2019
1 parent 1fd466e commit ac5a8f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def __init__(self, k1=0.9, b=0.4):
})

class Bm25PRFParams(Bm25Params):
def __init__(self, k1=0.9, b=0.4, k1_prf=0.9, b_prf=0.4, new_term_weight=0.2, num_new_termss=20, num_docs=10):
def __init__(self, k1=0.9, b=0.4, k1_prf=0.9, b_prf=0.4, new_term_weight=0.2, num_new_terms=20, num_docs=10):
super().__init__(k1, b)
self.update({
"bm25prf": True,
"bm25prf.k1": k1_prf,
"bm25prf.b": b_prf,
"bm25prf.newTermWeight": new_term_weight,
"bm25prf.fbTerms": num_new_termss,
"bm25prf.fbTerms": num_new_terms,
"bm25prf.fbDocs": num_docs
})

Expand Down
2 changes: 1 addition & 1 deletion tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def bm25_runner(index, topics, output, qrel, k1, b) -> Runner:

def bm25prf_runner(index, topics, output, qrel, k1, b, k1_prf, b_prf, num_terms, num_docs, weight) -> Runner:
params = Bm25PRFParams(k1=k1, b=b, k1_prf=k1_prf, b_prf=b_prf,
new_term_weight=weight, num_new_termss=num_terms, num_docs=num_docs)
new_term_weight=weight, num_new_terms=num_terms, num_docs=num_docs)
runner = Runner(index, topics, output,
model_params=params, eval_method="map", qrel_path=qrel)
return runner
Expand Down

0 comments on commit ac5a8f0

Please sign in to comment.