jtreceval

A Java wrapper around the binaries for NIST's trec_eval (https://github.com/usnistgov/trec_eval) on various platforms. The trec_eval binaries are included in the jar file, so the jar is easy to use on a number of platforms without compiling.

License

License

GroupId

GroupId

uk.ac.gla.dcs.terrierteam
ArtifactId

ArtifactId

jtreceval
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

jtreceval
A Java wrapper around the binaries for NIST's trec_eval (https://github.com/usnistgov/trec_eval) on various platforms. The trec_eval binaries are included in the jar file, so the jar is easy to use on a number of platforms without compiling.
Project URL

Project URL

https://github.com/terrierteam/jtreceval
Source Code Management

Source Code Management

https://github.com/terrierteam/jtreceval

Download jtreceval

How to add to project

<!-- https://jarcasting.com/artifacts/uk.ac.gla.dcs.terrierteam/jtreceval/ -->
<dependency>
    <groupId>uk.ac.gla.dcs.terrierteam</groupId>
    <artifactId>jtreceval</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/uk.ac.gla.dcs.terrierteam/jtreceval/
implementation 'uk.ac.gla.dcs.terrierteam:jtreceval:0.0.5'
// https://jarcasting.com/artifacts/uk.ac.gla.dcs.terrierteam/jtreceval/
implementation ("uk.ac.gla.dcs.terrierteam:jtreceval:0.0.5")
'uk.ac.gla.dcs.terrierteam:jtreceval:jar:0.0.5'
<dependency org="uk.ac.gla.dcs.terrierteam" name="jtreceval" rev="0.0.5">
  <artifact name="jtreceval" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.ac.gla.dcs.terrierteam', module='jtreceval', version='0.0.5')
)
libraryDependencies += "uk.ac.gla.dcs.terrierteam" % "jtreceval" % "0.0.5"
[uk.ac.gla.dcs.terrierteam/jtreceval "0.0.5"]

Dependencies

compile (1)

Group / Artifact Type Version
commons-io : commons-io jar 2.4

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.1

Project Modules

There are no modules declared in this project.

Build Status Maven Central

jtreceval

A Java wrapper around the binaries for NIST's trec_eval (https://github.com/usnistgov/trec_eval) on various platforms. The trec_eval binaries are included in the jar file, so the jar is easy to use on a number of platforms without compiling.

Currently, we have the binaries for the following operating systems:

  • Linux, Intel 32bit, 64bit
  • Mac OS X, Intel 64bit
  • Windows, Intel 32bit (and hence 64bit)

Dependency

Hosted on Maven Central:

<dependency>
  <groupId>uk.ac.gla.dcs.terrierteam</groupId>
  <artifactId>jtreceval</artifactId>
  <version>x.x.x</version>
</dependency>

Compiling

mvn package

Java 1.7 is the minimum requirement. The Maven pom file depends only on Apache Commons-IO, and Junit (for testing only).

Usage from the command-line

Essentially, executing the jar file using java -jar should have the same effect as executing trec_eval directly on your platform:

java -jar target/jtreceval-0.0.2-SNAPSHOT-jar-with-dependencies.jar

Example:

java -jar target/jtreceval-0.0.2-SNAPSHOT-jar-with-dependencies.jar qrels myrun.res

Usage from Java

String qrels = "/path/to/qrels";
String res = "/path/to/run";
trec_eval te = new trec_eval();
String[][] output = te.runAndGetOutput(new String[]{"-q", qrels, res});
//1st dimension is line of output, 2nd dim is [measure, query, value]

Known Issues/Possible Improvements

  1. Currently the Cywgin trec_eval binary is incorrectly detected as a virus by Windows Defender.
  2. A more reasonable Java API that is easy to use.

Credits

Developed by Craig Macdonald, University of Glasgow.

The repository contains compilations of NIST's trec_eval for various platforms.

Versions

Version
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1