A Python toolkit for reproducible information retrieval research with sparse and dense representations. Current version: 2.2.0 (requires Python >=3.12). Released on PyPI; active development on GitHub by Castorini group.
pip install pyseriniNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Search using a pre-built index (Robust04).
Update imports: from pyserini.search.lucene import LuceneSearcher (instead of pyserini.search.SimpleSearcher).
Set custom analyzer if needed: searcher.set_analyzer(MyAnalyzer()).