semanticscholar
semanticscholar copied to clipboard
Semantics of `limit` argument in `search_paper` seems to be wrong
Question
For example, I want to search only 2 papers.
I wrote this code:
res = sch.search_paper('llm', bulk=True, limit=2, open_access_pdf=True)
However, len(res) returns 1000.
Shouldn't it be 2?
I've looked through the source code and found this: https://github.com/danielnsilva/semanticscholar/blob/master/semanticscholar/AsyncSemanticScholar.py#L511
max_results = 10000000 if bulk else 1000
Something's wrong here (IMHO):
- Shouldn't
bulkbe used to specify the return type: eitherPaginatedResultsor a singlePaper. - Why this expression at all instead of:
max_results = limit