Centre for Language and Speech Technology

CLAM

“Build RESTful webservices and user interfaces for your command-line tools„

What is CLAM?

CLAM allows you to quickly and transparently transform your command line application into a RESTful webservice and web interface, with which both human end-users as well as automated clients can interact.

CLAM expects a description of your system and wraps itself around the system, allowing end-users or automated clients to upload input files to your application, start your application with specific parameters of their choice, and download and view the output of the application once it is completed.

CLAM is set up in a universal fashion, requiring minimal effort on the part of the service developer. Your actual application is treated as a black box, of which only the parameters, input formats and output formats need to be described. Your application itself needs not be network aware in any way, nor aware of CLAM, and the handling and validation of input can be taken care of by CLAM.

CLAM is entirely written in Python and runs on UNIX-derived systems. A Python API is provided, but knowledge of Python is not necessary to use CLAM. CLAM communicates using a transparent XML format, and uses XSL transformation offers a full web 2.0 web-interface for human end users.

CLAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.

CLAM is written by Maarten van Gompel, Centre of Language Studies, Radboud University Nijmegen.

Documentation

Please consult the CLAM Documentation for extensive documentation:

Support

Check back often as updates are released regularly for CLAM. These can be easily installed through the Python Package Index or directly from Github. Bug reports, feature requests and requests for assistance can be submitted through github, the mailing list, or by mailing to proycon@anaproy.nl.

A public roadmap of planned features for the future, as well as bug reports about existing features, can be found on the CLAM Issue Tracker. Feel free to add any problems or feature requests if you have a (free) github account!

CLAM support is funded by the NWO CLARIN-NL programme and its successor CLARIAH

Download and installation

CLAM is maintained at the Python Package Index. It is available for Linux and other UNIX-like distributions and is intended for users who want to build a webservice around their own tool, want to write a client for existing CLAM webservices, or are system administrators setting up existing CLAM services.

To automatically download and install CLAM from the Python Package Index, the convenient tool pip is available, it may be called pip3 if you want to use Python 3 (recommended):

$ pip3 install clam

We recommend the use of a Python Virtual Environment

The source code is also available through the source code repository at github

Please consult the CLAM Documentation for further instructions, including installation details. After reading the documentation, it is recommended to watch the CLAM tutorial videos at the bottom of this page.

Architecture

CLAM architecture

CLAM has a layered architecture, with at the core the NLP application(s) you want to turn into a webservice. The application itself can remain untouched and unaware of CLAM. The scheme on the right illustrates the various layers.

Read more in the CLAM Manual and also see the CLAM poster presented at CLIN 21.

Screenshot

A screenshot of a CLAM web interface can be found below, the interface is generic and automatically generated on the basis of your service configuration

CLAM architecture

Instruction videos

Make sure to watch the latest tutorial video first:


Tutorial (September 2015) - This tutorial shows everything you need to get started, it shows how to make a webservice for a simple command-line tool

The below instruction videos are older (2011), but still useful:


Part I - In this first video we will create a simple webservice around an ad-hoc NLP application.


Part II - We will expand the webservice we created in the first video.


Part III - We will take a deeper look into the metadata and parameter abilities of CLAM.


Part IV - In this video we will see how to write a client in Python to connect to the webservice we created earlier. We will use the CLAM Client API
badge