The list of obligatory packages, that you need to include into your project is:

peregrine-api (includes ontology-api and common-utils)

peregrine-normalizer

peregrine-tokenizer

You need to decide, what will be your ontology provider. There are several options[1]:

File source ontology (ontology-impl-file)

DB source ontology (ontology-impl-db)

You need to decide, whether you need to disambiguate text indexing results (usually, you do). If yes, you need to include peregrine-disambiguator project. Disambiguator layer can be used out of the box without special configuration.

You have to decide, what Peregrine interface implementation you want to use. By the time of writing this article, there is only one implementation available: peregrine-impl-hash

Using one of existing Peregrine projects

peregrine-ws is an example of exposing Peregrine interface as WebService. This is done using JAX-WS technology. JAX-WS provides a build-in servlet that serves registered HTTP endpoints.

peregrine-rmi is a nice example of how Peregrine interface can be exposed as RMI using build-in Spring framework facilities. However, if all RMI-staff is removed, you get an example of some command-line peregrine utility that can take some file as an argument for example, index it and write to another file.

peregrine-client is an example of using Peregine as a library in WebApplication. It provides simple JSP presentation of Peregine indexing results. As JSP is also a servlet, instead of speaking HTML it can produce XML (and act as REST service).

Not using maven & spring

You have to download the release package, which contains all necessary libraries. After adding the dependencies you needed to your project, you can program a simple scenario:

Profiling the memory usage of Peregrine

Peregrine has build-in support for memory profiling using wicket library. As this library is listed as optional in maven dependencies of org.erasmusmc.data-mining.peregrine.peregrine-impl-hash project, the end user of this dependency should explicitly add this dependency as runtime dependency, or add to WEB-INF/lib manually (in case of target deliverable is WAR application).