The Dataset Viewer has been disabled on this dataset.

PISA index of the BRIGHT Sustainable Living collection for PyTerrier

Description

An PISA index of the sustainable-living subset of the BRIGHT dataset build with PyTerrier's PISA plugin.

Usage

You will need to install PyTerrier, and its PISA engine:

%pip install pyterrier
%pip install pyterrier-pisa
import pyterrier as pt

pisa_index = pt.Artifact.from_hf('pyterrier-tutorial/bright.sustainable.pisa.text')
pisa_bm25 = pisa_index.bm25(k1=0.9, b=0.4)
pisa_bm25.search("renewable energy and sustainable development").head(10)

Reproduction

from pyterrier_pisa import PisaIndex

pisa_path = "./bright-pisa-index"

if os.path.exists(pisa_path):
    shutil.rmtree(pisa_path)

pisa_index = PisaIndex(
    pisa_path,
    text_field="text",
    threads=2,
    overwrite=True
)

dataset = pt.get_dataset('irds:bright/sustainable-living')
pisa_index.index(dataset.get_corpus_iter())

Metadata

{
  "type": "sparse_index",
  "format": "pisa",
  "package_hint": "pyterrier-pisa",
  "stemmer": "porter2"
}
Downloads last month
43