Closed cmacdonald closed 8 years ago
Have to mull this one. I'm not sure I want to start packaging wrappers. I don't think reading the entire file into memory is a good idea. If the decompression subprocesses fail the script can write partial files to the temporary outputs.
I'm not sure I want to start packaging wrappers
Of course, your choice. This is a script we've been using for years. I was wondering about Windows compatibility, but the trec_eval Makefile definitively wont port either.
I don't think reading the entire file into memory is a good idea
Fair. I can fix that in the Perl script trivially. A related point is that trec_eval already operates by loading entire files into memory (which it achieves IIRC by seeking to the end of the file, and then back to the start), and hence isn't able to operate on a pipe. The advantage using this script is that evaluation based on an input pipe is supported transparently.
If the decompression subprocesses fail the script can write partial files to the temporary outputs.
$? can be inspected to determine subprocess failure.
Ian: updated pull request addressing error checking and exit codes.
I tested to verify the script failed if gzip didnt exist, or exited with non-zero exit code.
I created a new branch version-10.0-dev. Could you please re-target your pull request to that branch, and I'll pull it in there.
See #4
Allows use of trec_eval in pipes, or with compressed qrels or res files.