Base classes to build plugins for Recogito. Work in progress! Currently, Recogito provides only a single extension point, which allows plugging in alternative Named Entity Recognition engines. Need something else? Get in touch via the Recogito Users Forum or open a ticket on the issue tracker.
Tools that are written in Java or any JVM language can be turned into Recogito plugins natively (since the plugin API is JVM-based). The use of non-JVM programming languages or external Web services is also possible. However, you need to provide a JVM wrapper that calls out to the external tool or service.
Simply provide a wrapper that implements the
org.pelagios.recogito.sdk.ner.NERPlugin
interface. See the
examples
for a minimal plugin that shows how the interface works. A more comprehensive example that
wraps the Stanford CoreNLP Named Entity Recognition library is available here.
To use the SDK in your code, add the recogito-plugin-sdk-0.0.2.jar
file to your project, either
as an unmanaged dependency (download here),
or by adding it to your build path with your favourite build tool. E.g. in SBT:
libraryDependencies ++= "org.pelagios" % "recogito-plugin-sdk" % "0.0.2" from "https://github.com/pelagios/recogito2-plugin-sdk/releases/download/v0.0.2/recogito-plugin-sdk-0.0.2.jar"
Build your plugin as a .jar file. Make sure you add a provider configuration file to the jar, so
that Recogito can load it. The configuration file is a simple text file, named
org.pelagios.recogito.sdk.ner.NERPlugin
, located in the META-INF/services
folder.
The file must contain a single line: the fully qualified name of your class that implements
the interface. E.g.: com.example.recogito.plugins.MyNERPlugin
.
To use your plugin in Recogito, place it anywhere in the plugins
folder (preferably a subfolder
you create), and restart Recogito.
Just in case you want to build the SDK from source, use sbt package
. The SDK .jar will be
in the target
folder.