Code Monkey home page Code Monkey logo

Comments (7)

lintool avatar lintool commented on September 25, 2024

Building three types of indexes, using uniCOIL as an example:

# "base"
target/appassembler/bin/IndexCollection \
  -collection JsonVectorCollection \
  -input /mnt/collections/msmarco/msmarco-passage-unicoil \
  -index indexes/lucene-index.msmarco-passage-unicoil/ \
  -generator DefaultLuceneDocumentGenerator \
  -threads 16 -impact -pretokenized -optimize &

# Store docvectors
target/appassembler/bin/IndexCollection \
  -collection JsonVectorCollection \
  -input /mnt/collections/msmarco/msmarco-passage-unicoil \
  -index indexes/lucene-index.msmarco-passage-unicoil.docvectors/ \
  -generator DefaultLuceneDocumentGenerator \
  -threads 16 -impact -pretokenized -storeDocvectors -optimize &

# Store raw text
target/appassembler/bin/IndexCollection \
  -collection JsonVectorCollection \
  -input /mnt/collections/msmarco/msmarco-passage-unicoil \
  -index indexes/lucene-index.msmarco-passage-unicoil.text/ \
  -generator DefaultLuceneDocumentGenerator \
  -threads 16 -impact -pretokenized -storeRaw -optimize &

Saves a lot of space to store only raw text:

$ du -h indexes/ | grep unicoil
1.3G	indexes/lucene-index.msmarco-passage-unicoil
47G	indexes/lucene-index.msmarco-passage-unicoil.docvectors
8.0G	indexes/lucene-index.msmarco-passage-unicoil.text

from anserini.

lintool avatar lintool commented on September 25, 2024

@AileenLin to help you out - this is currently what's not working on the Pyserini end:

python -m pyserini.search.lucene \
  --threads 16 --batch-size 128 \
  --index ../anserini/indexes/lucene-index.msmarco-passage-unicoil.docvectors \
  --topics dl19-passage-unicoil \
  --output runs/run.dl19-rocchio.txt \
  --hits 1000 --impact --rocchio

Ultimately, I want to make this work.

from anserini.

AileenLin avatar AileenLin commented on September 25, 2024

do you mean this error? AttributeError: 'LuceneImpactSearcher' object has no attribute 'set_rocchio'

I have tested anserini with the following and it matched the benchmark

target/appassembler/bin/SearchCollection \ -index indexes/lucene-index.msmarco-passage-unicoil.docvectors/ \ -topics src/main/resources/topics-and-qrels/topics.msmarco-passage.dev-subset.unicoil.tsv.gz \ -collection JsonVectorCollection \ -topicreader TsvInt \ -output runs/run.msmarco-passage-unicoil.rocchio.topics.msmarco-passage.dev-subset.unicoil.txt \ -impact -pretokenized -rocchio

target/appassembler/bin/SearchCollection \ -index indexes/lucene-index.msmarco-passage-unicoil.text/ \ -topics src/main/resources/topics-and-qrels/topics.msmarco-passage.dev-subset.unicoil.tsv.gz \ -collection JsonVectorCollection \ -topicreader TsvInt \ -output runs/run.msmarco-passage-unicoil.rocchio.topics.msmarco-passage.dev-subset.unicoil.txt \ -impact -pretokenized -rocchio

from anserini.

lintool avatar lintool commented on September 25, 2024

Yup, we need to expose the feature in the Java class, and then wire the connections to Python.

from anserini.

AileenLin avatar AileenLin commented on September 25, 2024

got it

from anserini.

lintool avatar lintool commented on September 25, 2024

Ref: #2164 #2165

from anserini.

lintool avatar lintool commented on September 25, 2024

This has been pushed out in v0.22.0 all done!

from anserini.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.