An (experimental) plugin to the Recogito annotation platform that adds Flair by Zalando Research as a Named Entity Recognition Engine.
The plugin consists of two parts:
- a minimal Python script that takes a filename as input, runs NER with Flair, and writes JSON results to STDOUT
- a Scala wrapper that implements the Recogito plugin interface, and calls out to the Python script via the command line
Make sure Flair is installed on your system: pip install flair
To run just the Python script use
python plugins/recogito.plugins.ner.flair/parse.py {filename}
To test parsing throught the Scala wrapper run
sbt test
- build the plugin using
sbt package
. This will create the .jar filetarget\recogito-plugin-ner-flair-0.1.jar
. - copy the .jar into a subfolder inside the Recogito
/plugins
folder - copy the Python script to the same subfolder
- make sure Flair is installed on the Recogito server