
Developing Applications with Terrier |
Terrier provides APIs for indexing documents, and querying the generated indices. If you are developing applications using Terrier or extending it for your own research, then you may find the following information useful.
Terrier has a very modular architecture, with many classes, some with various alternatives. It is very easy to change many parts of the indexing and retrieval process. Essential to any in-depth extension of Terrier is to examine the very many properties that can be configured in Terrier. For instance, if you write a new Matching class, you can use this in a TREC-like setting by setting the property trec.matching, while if you write a new document weighting model you should set the property trec.model to use it, or add it in etc/trec.models. For more information about extending the retrieval functionalities of Terrier, see Extending Retrieval, and Extending Indexing for more information about the indexing process Terrier uses.
The main Terrier distribution comes pre-compiled as Java, and can be run on any Java 1.5 JDK. You should have no need to compile Terrier unless:
Terrier is distributed with two scripts for compiling Terrier for Unix-like platforms:
NB:Currently we suggest that you use the Makefile instead of the script bin/compile.(sh,bat), and that you always execute make clean compile to compile Terrier. This ensures that the TerrierParser is always built correctly.
There are files missing from the Terrier source code? This is correct as in the source for some classes arent included. This is because these files are generated automatically by Antlr during the compiling process. The build process invokes the Antlr "compiler compiler", which generates the missing Java source files from the queryparser specification (the .g files in src/uk/ac/gla/terrier/querying/parser/).
If you want to compile your application code that uses functionalities of Terrier, then it is preferable to make the compilation having the file lib/terrier-1.X.X.jar in your classpath, instead of the folder src/.
If you use the Eclipse IDE, then you can get it to correctly compile Terrier by installing the Antlr Eclipse Plugin.
How do I run the test harness? On the command line, run make test 2>&1 | tee test.log | egrep ^Test. There are many tests for various indexing and retrieval functionalities. In all cases, Mean Average Precision (MAP) should be 1.0000. If this it not the case, check test.log to see what went wrong. The test harness will be extended as Terrier matures.
[Previous: List of Terrier properties] [Contents] [Next: Extending Indexing]Copyright © 2011 University of Glasgow | All Rights Reserved