question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pyserini package/module structure: unnecessary nesting?

See original GitHub issue

Current invoking is something like:

from pyserini.search import pysearch
searcher = pysearch.SimpleSearcher('lucene-index.robust04.pos+docvectors+rawdocs')

@zeynepakkalyoncu @emmileaf don’t you think we have one unnecessary nested layer?

Would something like this make more sense?

from pyserini import search
searcher = search.SimpleSearcher('lucene-index.robust04.pos+docvectors+rawdocs')

or

from pyserini.search import SimpleSearcher
searcher = SimpleSearcher('lucene-index.robust04.pos+docvectors+rawdocs')

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
emmileafcommented, Nov 27, 2019

I think the submodule was originally there to mirror the java structure:

  • pyserini.search corresponds to java/io/anserini/search and would contain every module that we want to bridge from there.
  • pysearch.py was intended to mirror SimpleSearcher.java, which is the only module we have bridged to pyserini for now

If we don’t plan to extend anything else over from java/io/anserini/search in the near future, we can probably get rid of the submodule? Otherwise I’d second @zeynepakkalyoncu’s suggestion to perhaps rename pysearch.py to something like simple_searcher.py.

0reactions
lintoolcommented, Nov 27, 2019

@emmileaf re: future proofing when modules grow too big. Agreed. You’ve convinced me - let’s keep the sub-packages. You were right all along! 😃

Closing issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pyserini: A Python Toolkit for Reproducible Information ...
It aims to pro- vide effective, reproducible, and easy-to-use first-stage retrieval in a multi-stage ranking architecture. Our toolkit is self- ...
Read more >
Pyserini: An Easy-to-Use Python Toolkit to Support Replicable ...
Pyserini is an easy-to-use Python toolkit that supports replicable IR research by providing effective first-stage retrieval in a multi-stage ranking ...
Read more >
Pyserini: An Easy-to-Use Python Toolkit to Support Replicable ...
Pyserini is an easy-to-use Python toolkit that supports replicable. IR research by providing effective first-stage retrieval in a multi- stage ...
Read more >
Pyserini: A Python Toolkit for Reproducible ... - ResearchGate
Pyserini : A Python Toolkit for Reproducible Information Retrieval Research with Sparse and Dense Representations ... To read the full-text of this ...
Read more >
pyserini - PyPI
Pyserini is a Python toolkit for reproducible information retrieval ... and easy-to-use first-stage retrieval in a multi-stage ranking architecture.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found