OSF Tagger (Scones) Installation Instructions

The OSF Tagger (Scones) web service system (subject concepts or named entities) is used to perform subject concepts and named entities tagging on a target document. The GATE system is used to perform the tagging. A GATE XML annotation file is returned to the user.

Scones uses tomcat6, PHP/Java Bridge and GATE.

Installing & Configuring the Scones Web Service Endpoint
webapps folder and copy Scones.war into that folder (/var/lib/tomcat6/webapps/ on a default Ubuntu installation), and wait until tomcat install & deploy the war file. Depending on your setup, you may need to use one of the following set of commands: the generated XGAPP file. And make sure that all the paths to different files (named entities dictionaries used by gazetteer, ontologies, etc) can be located on the server where Scones will be running. Make sure that the paths to the GATE plugins files (in the /webapps/Scones/Gate-Plugins/ folder) are properly defined.
 * 1) Install tomcat6
 * 2) Install Scones.war
 * 3) Scones.war is a packaged version of GATE + the PHP/Java bridge softwares, configured for Scones's purposes. It includes the PHP/Java bridge version 6.2.1 and Gate version 7
 * 4) To install Scones.war, make sure tomcat6 is running, locate tomcat's
 * 1) Restart tomcat to properly handle this new web application.
 * 1) or
 * 2) Properly setup the   file on your server
 * 3) The more liberal permissions would be to add that line to that file:
 * 4) grant codeBase
 * 5) Restart tomcat6
 * 6) Create GATE application
 * 7) You can use the GATE Developper user interface to create a new GATE application to use with Scones. Or simply use the   default application file.
 * 8) Create a new GATE pipeline, and save it into a XGAPP file.
 * 9) Modify the gate application XGAPP file generated by the GATE Developer user interface for the Scones setup
 * 10) Edit
 * 1) Restart tomcat6
 * 2) Create GATE application
 * 3) You can use the GATE Developper user interface to create a new GATE application to use with Scones. Or simply use the   default application file.
 * 4) Create a new GATE pipeline, and save it into a XGAPP file.
 * 5) Modify the gate application XGAPP file generated by the GATE Developer user interface for the Scones setup
 * 6) Edit
 * 1) Configure the Scones web service endpoint
 * 2) Make sure you properly configured the Scones web service endpoint by properly configuring the config.ini configuration file on the server. By default, this file is located here on your server:
 * 3) In the php.ini file, you will have to enable (turn "On") the allow_url_include directive.
 * 4) Make sure the port tomcat6 runs on (8080 by default) is not used by another application (such as Jetty)

Initialize Scones Web Service
The next step is to initialize the Scones web service endpoint. Each time tomcat6 is restarted, Scones has to be re-initialized as well. The initialization phase consist in creating the GATE threads that will be used (concurrently if needed) to analyze incoming texts.


 * http://my-domain.com/ws/scones/admin/init.php

Other Scones Web Service Tools
We have access to two other tools to help us managing the Scones web service endpoint.

If you want to re-initialize Scones without restarting tomcat, then you can use the destroy.php script in the admin folder to destroy all the previously created sessions:


 * http://my-domain.com/ws/scones/admin/destroy.php

Additionally, if you want to check what session is currently in use in the system, you can use the analyzeSessions.php to have the status of the loaded sesions:


 * http://my-domain.com/ws/scones/admin/analyzeSessions.php

The output looks like:

Sessions ID: #1 Used: FALSE Number of documents: 0 Sessions ID: #2 Used: FALSE Number of documents: 0 Sessions ID: #3 Used: FALSE Number of documents: 0

If used is TRUE, then it means that that session is currently used by a user. The Number of documents is the number of documents currently being tagged by that user. If used is FALSE, it simply means that the session is waiting to be used by a request user.

Integrating Scones with OSF Ontology
In a OSF Web Service and OSF for Drupal setup, all ontologies are managed by the OSF Web Service ontologies endpoints and the OSF Ontology module.

The integration of these two systems, along with Scones, can easily be done by properly configuring the XGAPP application you created above. The only thing you have to do, modify your XGAPP application to refer to the files managed by structOntology and the OSF Web Service ontologies web service endpoints.

These ontologies files are located in the folder determined by the configuration option  defined in the   section of the   configuration file.

That folder is where all the ontologies files, manipulated by these systems reside on the server.

Taking Ontology Changes Into Account
All the changes to the ontologies used by Scones are not automatically applied to the running Scones instance. This means that if you are changing some of the ontologies used by Scones, using the OSF Ontology module, these changes won't be taking into account if you tag a new document using Scones.

To make Scones taking these changes into account, you have to perform the following steps:


 * 1) In OSF Ontology, make sure to  the ontologies that changed. This action will save the ontologies change into the ontologies files.
 * 2) Destroy the current Scones instance by using this script: http://my-domain.com/ws/scones/admin/destroy.php
 * 3) Re-create the Scones instance by using this script: http://my-domain.com/ws/scones/admin/init.php

Once you performed these three steps, the next documents you will tag using Scones will take the new ontologies changes into account.

Integrating Scones With Named Entities Datasets
Scones not only tags concepts that comes from an OWL ontology, but also tags named entities that are defined in some Named Entity dictionaries.

These named entity dictionaries are specially formatted text files that are used by Gate. The best way to create them is to let structScones generate them for you.

The only thing you have to do is to create datasets of records in OSF Web Service. Then, you should tag all the records, in these datasets, that you consider as named entities that should be used to tag documents processed with Scones.

The tagging of named entities is quite simple by adding a triple to each of these records that are named entities. This triple is using the  attribute like:

All records tagged that way will be added to some Scones named entity dictionaries and will be used for Scones tagging purposes.

Taking Named Entities Changes Into Account
All the changes to the named entities used to generate the Scones named entity dictionaries are not automatically applied to the running Scones instance. This means that if you are changing some of the named entities used by Scones, in their own datasets, these changes won't be taken into account if you tag a new document using Scones.

The Named Entities dictionaries used by Gate will need to be recreated.