Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
SconesQuery Class Reference

Scones to a OSF Scones web service endpoint. More...

Inheritance diagram for SconesQuery:

Public Member Functions

 __construct ($network, $appID, $apiKey, $userID)
 Constructor. More...
 
 document ($document)
 Document content to process; or URL of a document accessible on the web to extract/process. More...
 
 application ($application)
 Specifies the application to use to tag the content of the input document. More...
 

Detailed Description

Scones to a OSF Scones web service endpoint.

The 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.

This Web service is intended to be used by users that wants to tag subjects concepts and named entities using the content of a target OSF instance. Since the scones instance is re-using the ontologies & named entities defined on a specific OSF instance, tagging will be performed using this specific information. So, if a specific OSF instance is hosted, maintained and defined by an a Health related organization, than their scones web service should be better at tagging Health related documents.

So, not all scones instance are equal, and some are expected to be better at tagging specific articles than other, depending on the domain defined on a specific node.

Here is a code example of how this class can be used by developers:

use \StructuredDynamics\osf\php\api\ws\scones\SconesQuery;
$scones = new SconesQuery("http://localhost/ws/");
// Specify the document (in this case, a web page) you want to tag using that Scones instance.
$scones->document("http://fgiasson.com");
// Tag the document
$scones->send();
if($scones->isSuccessful())
{
// Output the Gate tagged document.
echo $scones->getResultset();
}
else
{
echo "Scones tagging failed: ".$scones->getStatus()." (".$scones->getStatusMessage().")\n";
echo $scones->getStatusMessageDescription();
}
See also
http://wiki.opensemanticframework.org/index.php/Scones
https://github.com/structureddynamics/Scones
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 65 of file SconesQuery.php.

Constructor & Destructor Documentation

__construct (   $network,
  $appID,
  $apiKey,
  $userID 
)

Constructor.

Parameters
mixed$networkOSF network where to send this query. Ex: http://localhost/ws/
mixed$appIDThe Application ID of the instance instance to key. The APP-ID is related to the API-KEY
mixed$apiKeyThe API Key of the OSF web service endpoints
mixed$userIDThe ID of the user that is doing the query

Definition at line 75 of file SconesQuery.php.

Member Function Documentation

application (   $application)

Specifies the application to use to tag the content of the input document.

If other applications are available, these should be listed somewhere on the website of the agent that host the service.

Parameters
mixed$applicationApplication to use to tag the content of the input document. If other applications are available, these should be listed somewhere on the website of the agent that host the service.
See also
http://wiki.opensemanticframework.org/index.php/Scones#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.*

Definition at line 145 of file SconesQuery.php.

document (   $document)

Document content to process; or URL of a document accessible on the web to extract/process.

The document types accessible at that URL can be either:

  • a plain text document
  • a HTML document
  • a PDF document
  • a MS Word document
  • a Email document
  • a RTF document
  • a SGML document
  • a XML document
Parameters
mixed$documentFull text document, or URL where the document can be accessed of the document to tag using Scones.
See also
http://wiki.opensemanticframework.org/index.php/Scones#Web_Service_Endpoint_Information
Author
Frederick Giasson, Structured Dynamics LLC.*

Definition at line 125 of file SconesQuery.php.