Skip to content

Commit

Permalink
Merge pull request #269 from terrier-org/issue_264
Browse files Browse the repository at this point in the history
addresses #264, text.scorer() will default to takes=docs
  • Loading branch information
cmacdonald committed Jan 14, 2022
2 parents 0c7a875 + a6ae057 commit b061c74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyterrier/batchretrieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ class TextScorer(TextIndexProcessor):
Unknown kwargs are passed to BatchRetrieve.
Arguments:
takes(str): configuration - what is needed as input: `"queries"`, or `"docs"`.
returns(str): configuration - what is needed as output: `"queries"`, or `"docs"`.
takes(str): configuration - what is needed as input: `"queries"`, or `"docs"`. Default is `"docs"` since v0.8.
returns(str): configuration - what is needed as output: `"queries"`, or `"docs"`. Default is `"docs"`.
body_attr(str): what dataframe input column contains the text of the document. Default is `"body"`.
wmodel(str): example of configuration passed to BatchRetrieve.
Expand All @@ -551,8 +551,8 @@ class TextScorer(TextIndexProcessor):
#rtr will score each document for the query "chemical reactions" based on the provided document contents
"""

def __init__(self, **kwargs):
super().__init__(BatchRetrieve, **kwargs)
def __init__(self, takes="docs", **kwargs):
super().__init__(BatchRetrieve, takes=takes, **kwargs)

class FeaturesBatchRetrieve(BatchRetrieve):
"""
Expand Down

0 comments on commit b061c74

Please sign in to comment.