Location specific components in the QALL-ME Framework
are components that operate differently on question and answer data for
different local information. In principle all implementations of location
specific components could be the same – barring location specific resources
which are used in the component implementations. Note, however, that if a
certain implementation of a location specific component type supports several
different locations automatically, then this implementation
has to be introduced multiple times to the
QAPlanner
using the setComponent
web method once per supported location (cf. 4.2.2.2).
Location specific component implementations do not belong to the core QALL-ME Framework. However, some demo component implementations for different locations are provided as examples in Java – see section 4.4: “Demo Components Description” for details.
The EntityAnnotator
is a WS
which annotates named entities in a natural language text string with their
types and optionally their canonical form. The WS’s
WSDL description can be found under src/main/net/sf/qallme/res/wsdl/entityannotation.wsdl
.
For the annotation of language specific and rather location independent
terms the TermAnnotator
is used – see also section
4.2.3.1.
Within the QALL-ME Framework we refer to temporal “entities”
as temporal expressions; for the annotation of such expressions you should use
the language specific TimeAnnotator
– see section 4.2.3.2.
The EntityAnnotator
has the following web
methods:
The annotateEntities
web method annotates named
entities in a given natural language text string. For example, such entities may
be location names, person names or movie names. Optionally the canonical form
for each entity can be included in the annotation, for example to ease database
queries which are generated from the annotation.
Sample request (SOAP body):
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <string xmlns="http://qallme.sf.net/wsdl/qallmeshared.wsdl" >Wo kann ich heute in Schmelz Saw 3 sehen?</string> </soapenv:Body>
Sample response (SOAP body):
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <AnnotatedSentence xmlns="http://qallme.sf.net/xsd/qallmeshared.xsd" >Wo kann ich heute in <annotation type="DESTINATION" >Schmelz</annotation> <annotation canonicalForm="Saw III" type="MOVIE" >Saw 3</annotation> sehen?</AnnotatedSentence> </soapenv:Body>
The AnswerPool
is a WS which
returns an RDF answer graph for a given
SPARQL “CONSTRUCT” query. In the QALL-ME
Framework this query is usualy automatically created by a
QueryGenerator
implementation (cf. 4.2.3.3). The
AnswerPool
’s WSDL description can
be found under src/main/net/sf/qallme/res/wsdl/answerpool.wsdl
.
The AnswerPool
has the following web methods:
The getAnswers
web method returns an
RDF answer graph for a given SPARQL
“CONSTRUCT” query. If the SPARQL query is not well-formed,
for example if the query is not a SPARQL “CONSTRUCT” query,
then a MalformedQueryFault is issued. If the
AnswerPool
does not contain any answer matching the
given query, then an empty RDF graph is returned.
Sample request (SOAP body):
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <string xmlns="http://qallme.sf.net/wsdl/qallmeshared.wsdl"> PREFIX qmo: <http://qallme.itc.it/ontology/qallme-tourism.owl#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX qma: <http://qallme.fbk.eu/ontology/qallme-answers.owl#> CONSTRUCT { ?cinema qmo:name ?cinemaName . ?event qmo:isInSite ?cinema ; qmo:hasEventContent ?movie . ?movie qmo:name ?movieName ; qmo:duration ?duration ; a qmo:Movie . qma:AnswerInstance a qma:AnswersObject ; qma:hasAnswerValue ?movie . } WHERE { ?cinema qmo:name ?cinemaName . ?event qmo:isInSite ?cinema ; qmo:hasEventContent ?movie . ?movie qmo:name ?movieName ; qmo:duration ?duration . FILTER(?cinemaName = "Xanadu"^^xsd:string) . } </string> </soapenv:Body>
Sample response (SOAP body):
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <RDFGraph xmlns="http://qallme.sf.net/xsd/qallmeshared.xsd"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:qma="http://qallme.fbk.eu/ontology/qallme-answers.owl#" xmlns:qmo="http://qallme.itc.it/ontology/qallme-tourism.owl#"> <qma:AnswersObject rdf:about="http://qallme.fbk.eu/ontology/qallme-answers.owl#AnswerInstance"> <qma:hasAnswerValue> <qmo:Movie rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_12052"> <qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Die Wilden Kerle 4</qmo:name> <qmo:duration rdf:datatype="http://www.w3.org/2001/XMLSchema#duration">PT111M</qmo:duration> </qmo:Movie> </qma:hasAnswerValue> <qma:hasAnswerValue> <qmo:Movie rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_2835"> <qmo:duration rdf:datatype="http://www.w3.org/2001/XMLSchema#duration">PT102M</qmo:duration> <qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Rocky Balboa</qmo:name> </qmo:Movie> </qma:hasAnswerValue> </qma:AnswersObject> <rdf:Description rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Event_DFKI_375"> <qmo:isInSite> <rdf:Description rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Cinema_DFKI_Xanadu"> <qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Xanadu</qmo:name> </rdf:Description> </qmo:isInSite> <qmo:hasEventContent rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_12052"/> </rdf:Description> <rdf:Description rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Event_DFKI_371"> <qmo:hasEventContent rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_2835"/> <qmo:isInSite rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Cinema_DFKI_Xanadu"/> </rdf:Description> <rdf:Description rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Event_DFKI_368"> <qmo:hasEventContent rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_2835"/> <qmo:isInSite rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Cinema_DFKI_Xanadu"/> </rdf:Description> <rdf:Description rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Event_DFKI_374"> <qmo:hasEventContent rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_12052"/> <qmo:isInSite rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Cinema_DFKI_Xanadu"/> </rdf:Description> </rdf:RDF> </RDFGraph> </soapenv:Body>