February 13, 2017

Using KeLP via Maven

KeLP can be easily included in your JAVA project as a Maven dependency, as shown in the rest of this page.
The Source Code is available on the KeLP GitHub page.

How to import KeLP

KeLP has been developed in different packages according to a modularization aimed at logically separating the different components of the library: the current release is composed of the following 4 projects:

  • kelp-core: it contains the infrastructure of abstract classes and interfaces to work with KeLP. Furthermore, some implementations of algorithms, kernels and representations are included to provide a base operative environment.
  • kelp-additional-kernels: it contains several kernel functions that extend the set of kernels made available in the kelp-core project. Moreover, this project implements the specific representations required to enable the application of such kernels. For instance, this project includes Sequence Kernels, Tree Kernels and Graph Kernels.
  • kelp-additional-algorithms: it contains several learning algorithms extending the set of algorithms provided in the kelp-core project. In particular, advanced learning algorithms for classification and regression can be found in this package, such as Online Learning algorithms.
  • kelp-full: this is the complete package of KeLP. It aggregates the previous modules. It contains also a set of fully functioning examples showing how to implement a learning system with KeLP. Batch as well as Online Learning algorithms usage is shown here. Different examples cover the usage of standard kernel, Tree Kernels and Sequence Kernel, with caching mechanisms.

All the KeLP packages are released under Maven in our repositories.

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage the compiling of a Java project as well as its reporting and documentation from a centralized repository.

Currently, a custom repository is used to distribute the maven packages for the whole platform. Thus, it is necessary to specify the repository where the platform is located. The repositories of Maven project for KeLP can be specified In the pom.xml with the following piece of code:

A full version ok KeLP is available on maven in the package kelp-full. It includes all the modules that compose the library. To import the 2.2.1 version of kelp-full, you can use the following Maven dependency.

Maven allows also to import a subset of the packages. For example, if you need only to work with tree kernel functions, you can import only the kelp-additional-kernels package in your project.
For example, to import the 2.2.1 version of this package, the dependency specification to be added in your pom.xml is:

For a complete example on how to import KeLP packages via Maven, please refer to the pom.xml that is contained in the kelp-full project (available on GitHub).

NOTE: KeLP packages are meant to enable users to import only the needed dependencies for each project. For example, if one needs only to work with Online Learning algorithms it is sufficient to import the kelp-additional-algorithms package.