|
Connecting a Semantic Search Tool |
Connecting an semantic search tool to the SEALS Platform is easy. In order to allow the SEALS Platform to interact with your tool with no outside assistance (from you or us), we ask that you implement a Java programming interface (API) to expose a number of important functionalities. The methods defined in this interface relate to one or more evaluation phases. Common to both phases - Load a particular ontology and triple set (provided as bundle)
boolean loadOntology(URI ontology, String ontologyName, String ontologyNamespace) This method receives the following input parameters: the location of the file containing the ontology and triple set (ontology); the name of the ontology (ontologyName); and the namespace of the ontology (ontologyNamespace). Returns true or false denoting success or otherwise of the attempt to load the ontology. This will inform the interoperability criterion. - Switch the tool's GUI on or off
void showGUI() This method is used to instruct the tool to display the GUI (if part of the user-in-the-loop evaluation phase) or not display the GUI (for the automated evaluation phase). boolean isResultSetReady() This method is used to determine if the results of a query are available. This is used (in combination with a timer) to determine how long a tool takes to answer a query. String getResults() Get results. This method obtains the results currently held by the tool; they should be returned in the SPARQL Query Results XML Format (W3C Recommendation 15 January 2008). It is left to the tool provider to decide how many results to return to use for evaluation. Each individual result URI can have an associated relevance score (0 to 1). Automated phaseboolean executeQuery(String query) This method executes the query (query). The content of the query is determined by the tool provider and will be tailored to an individual search tool (i.e., a string representation of the internal query representation). Returns true or false denoting success or otherwise of the attempt to execute the query. This will inform the interoperability and general performance criteria. User in the loop phase - Determine user query input has been completed
boolean isUserInputComplete() This method determines whether or not the user has finished inputting the query into the tool. In other words, it would return false while the user is still typing or clicking (or thinking) and would return true once the user has hit the 'submit' button (or equivalent). String getUserQuery() This method extracts a String representation of the query entered by the user. This will be called once the user input has been completed. The returned string will contain the string representation of the user's query input. If the tool uses a Natural Language interface, this method would simply return the text entered by the user. String getInternalQuery() This method extracts a String representation of the internal query. This will be called once the user input has been completed and the search tool has transformed the input into it's own representation. This string should in a form such that it could be passed to void executeQuery(String query) and obtain the same results. Your tool (or more likely the wrapper produced to act as an interface between your tool and the platform) must implement this Java Interface. See the What do I have to do as a participant? page for information on how to bundle your wrapper and tool and download a tutorial to help you through the process.
|