Web Mining and Retrieval course

KeLP tutorial

This folder contains examples showing how to implement a Kernel-based classifier for the Question Classification task, by adopting KeLP [Filice et al, 2015], i.e., the Kernel-based Learning Platform developed in the Semantic Analytics Group of the University of Roma Tor Vergata.

This folder contains the following files and folders:


Requirements

The following examples require the JAVA JDK 6 installed on the machine.


How to compile the examples

From the main folder, launch the following commands:

javac -cp lib/kelp-full2.0.2.jar WmIRQuestionClassificationExample.java
javac -cp lib/kelp-full2.0.2.jar WmIRQuestionClassificationExampleFromJson.java

How to run the examples

This tutorial shows how to build a Kernel based SVM classifier with KeLP. The following JAVA examples show how to :

The WmIRQuestionClassificationExample.java example

This example shows how to implement algorithms and kernel functions directly through JAVA code. Once it has been compiled, execute the following command:

java -cp .:./lib/kelp-full2.0.2.jar WmIRQuestionClassificationExample training_set_path test_set_path kernel[lin| poly | tk | comb | comb-norm] c_svm

where:

When executed, the program will save a SVM model with the Support Vectors.

The WmIRQuestionClassificationExampleFromJson.java example

This example shows how to implement a classifier by reading the learning algorithm and kernel functions from a JSON files. Once it has been compiled, execute the following command:

java -cp .:./lib/kelp-full2.0.2.jar WmIRQuestionClassificationExampleFromJson training_set_path test_set_path json_file_path

where:

Please, refer to the presentation svm_kelp_practice for more details about the code and the input data.


References

[Li and Roth, 2002] Xin Li, Dan Roth, Learning Question Classifiers. COLING'02, Aug., 2002.

[Vishwanathan and Smola, 2003] S.V.N. Vishwanathan and A.J. Smola. Fast kernels on strings and trees. In Proceedings of Neural Information Processing Systems, 2003.

[Croce et al, 2011] Danilo Croce, Alessandro Moschitti, and Roberto Basili. 2011. Structured lexical similarity via convolution kernels on dependency trees. In EMNLP, Edinburgh.

[Filice et al, 2015] Simone Filice, Giuseppe Castellucci, Danilo Croce, and Roberto Basili. 2015. Kelp: a kernel-based learning platform for natural language processing. In Proceedings of ACL: System Demonstrations, Beijing, China, July.


How to cite KeLP

If you find KeLP usefull in your researches, please cite the following paper:

@InProceedings{filice-EtAl:2015:ACL-IJCNLP-2015-System-Demonstrations,
    author = {Filice, Simone and Castellucci, Giuseppe and Croce, Danilo and Basili, Roberto},
    title = {KeLP: a Kernel-based Learning Platform for Natural Language Processing},
    booktitle = {Proceedings of ACL-IJCNLP 2015 System Demonstrations},
    month = {July},
    year = {2015},
    address = {Beijing, China},
    publisher = {Association for Computational Linguistics and The Asian Federation of Natural Language Processing},
    pages = {19--24},
    url = {http://www.aclweb.org/anthology/P15-4004}
}

Useful Links

KeLP site: http://sag.art.uniroma2.it/demo-software/kelp/

SAG site: http://sag.art.uniroma2.it

Source code hosted at GitHub: https://github.com/SAG-KeLP