Terrier Users :  Terrier Forum terrier.org
General discussion about using/developing applications using Terrier 
How to set a topic File for every retrieval?
Posted by: nadhem7 ()
Date: January 11, 2018 06:02PM

Hi everyone,

I would like to set a topic File for every retrieval.
Now,to do a retrieval process, I'm using TRECQuerying but it uses the topic file mentioned in terrier.properties.

Is there a method which define a different topic file for each retrieval?

Any help would be most appreciated.

thanks,
Nadhem...

Options: ReplyQuote
Re: How to set a topic File for every retrieval?
Posted by: craigm ()
Date: January 17, 2018 01:51PM

Hi Nadhem,

You can override any property using the command line with -Dtrec.topics=/path/to/my/file

Then use your own favourite scripting language to launch Terrier while altering the properties appropriately.

HTH

Craig

Options: ReplyQuote
Re: How to set a topic File for every retrieval?
Posted by: nadhem7 ()
Date: January 17, 2018 04:41PM

Hi Craig,

The problem is that I have a lot of topic file and I want that for each file topic it creates a res file. I can't type them all in the command box, I just wanted to do it with just the java code with the TRECQuerying class.

Thanks!
Nadhem...

Options: ReplyQuote
Re: How to set a topic File for every retrieval?
Posted by: craigm ()
Date: January 18, 2018 10:55AM

Nadhem,

In bash, I would do

for i in /path/to/topic_files/*; do bin/trec_terrier.sh -r -Dtrec.topics=$i; done

Scripting is essential for conducting IR experiments.

Craig

Options: ReplyQuote


Sorry, only registered users may post in this forum.
This forum powered by Phorum.