4.4. Demo Components Description

It’s the nature of a framework to only provide a skeleton for new systems and as such the QALL-ME Framework also leaves several core implementation decisions up to the framework users. This section is here to provide a description of the implementation specific decisions that were taken for the demo implementations of the framework’s question answering (QA) system components which are shipped as examples in the DemoKit package (cf. section 4.1.1). The first subsection, 4.4.1: “General Remarks”, describes general design decisions which are valid for all demo components and their interplay. The remaining subsections then briefly provide relevant information for the language and location specific subsystem implementations in the DemoKit.

This section provides general information which is valid for all demo implementations that ship with the QALL-ME Framework. There are currently three language specific and three location specific demo subsystems available which all stem from the QALL-ME project (cf. 2.4: “By the Way: What is QALL-ME?”).

As specified in the framework overview, the domain on which the built QA system will operate is specified by a domain ontology – see 2.1.3: “Use of a Domain Ontology”. The domain of the demo components is tourism in general and cinemas or movie events in particular. The freely available QALL-ME Ontology is used as the common domain ontology in all demo components. Just like the QALL-ME Framework it has been developed in the QALL-ME project. It can be downloaded from the QALL-ME project’s webpages. However, for the use of the demo components, the ontology doesn’t need to be downloaded separately: it is already included in the DemoKit package.

In the description of the QAPlanner (cf. section 4.2.2.2) we have already seen that the answers of a QA system which is based on the QALL-ME Framework are always packed in an answer graph. The concrete structure of these answer graphs is determined by the SPARQL queries which are created by the QueryGenerator component implementations (cf. section 4.2.3.3). In the QA system as provided by the DemoKit we are using a common answer graph structure that provides several pieces of information which different kinds of answer presentation components might find useful later:

  • the concrete answer values, e.g., name of a cinema or duration of a movie
  • the expected answer type (EAT); may be useful for selecting a strategy for the presentation of the answer
  • the context of the answer in form of the information from the question; may be useful for generating a complete answer sentence later
  • possibly further information that may optionally support the answer presentation, e.g., geocoordinates of a cinema or further information about running movies (duration, description, etc.)
All this information is encoded as RDF triples using elements from the QALL-ME Ontology (cf. 4.4.1.1: “Question Answering Domain”) as the vocabulary. For the representation of the concrete answer values and the EAT we additionally use the vocabulary of a small extra ontology, the QALL-ME Answers Ontology. This ontology (prefix: qma) basically just contains a template for an answers object. Every answer is then encoded by an instance of the qma:AnswersObject class of the ontology. As can be seen from the following example result RDF answer graph, in the CONSTRUCT part of every SPARQL query it is now always made sure that:
  • the rdf:type of the expected answer is explicitly given (qmo:Genre in the example); therewith the query only needs to create a plain RDF graph upon which an answer presentation component does not need to reason.
  • instances are created of the qma:AnswersObject class of the new ontology. The qma:hasAnswerValue properties of this object will point to the actual answers (movie genres in the example). The EAT of the actual answers is the rdf:type of these answer instances (qmo:Genre in the example).

<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:Genre rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Genre_musical">
				<qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">musical</qmo:name>
			</qmo:Genre>
		</qma:hasAnswerValue>
		<qma:hasAnswerValue>
			<qmo:Genre rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Genre_drama">
				<qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">drama</qmo:name>
			</qmo:Genre>
		</qma:hasAnswerValue>
	</qma:AnswersObject>
	<qmo:Movie rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Movie_DFKI_5934">
		<qmo:hasGenre rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Genre_musical"/>
		<qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Dreamgirls</qmo:name>
		<qmo:hasGenre rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#Genre_drama"/>
	</qmo:Movie>
</rdf:RDF>

If an inquiry is complex – in that it asks for several different things –, then there will have to be several instances of the qma:AnswersObject class; examples for such cases might be the questions “Where and when can I see Dreamgirls tonight?” or “What are the check-in and check-out times of Hotel Zur Eiche?”.

An important part of representing answers with the QALL-ME Answers Ontology is the support of non-concept answer types (with respect to the QALL-ME Ontology vocabulary): the above example graph came from a question with a concept EAT. But we also have questions with datatype EATs, like the question “What is the movie Dreamgirls about?”. For such questions the qma:isSpecifiedBy property of qma:AnswersObject has to be used. Here is an output example:

<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_5934">
				<qmo:hasGenre>
					<qmo:Genre rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Genre_musical">
						<qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">musical</qmo:name>
					</qmo:Genre>
				</qmo:hasGenre>
				<qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Dreamgirls</qmo:name>
				<qmo:hasGenre>
					<qmo:Genre rdf:about="http://qallme.itc.it/ontology/qallme-tourism.owl#Genre_drama">
						<qmo:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">drama</qmo:name>
					</qmo:Genre>
				</qmo:hasGenre>
				<qmo:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">In den frühen 60ern entdeckt der ehrgeizige Manager Curtis bei einem Talentwettbewerb "The Dreamettes". Er spürt sofort: mit diesem Trio kommt er ganz groß raus. Auch Deena, Effie und Lorrell sehen die Chance ihres Lebens: das Rampenlicht der großen Bühne. Traumhaft! Die Realität jedoch hält für die drei erst einmal das Schattendasein als Background-Sängerinnen parat. Dafür steht James "Early" Thunder dort, wo sie längst hingehören: im gleißenden Licht der Scheinwerfer. Doch so schnell sein Stern verblasst, geht der ihre auf. Als Motowngruppe "The Dreams" füllen sie in kürzester Zeit die größten Hallen. Jetzt sind sie die Musiksensation des Landes.</qmo:description>
			</qmo:Movie>
		</qma:hasAnswerValue>
		<qma:isSpecifiedBy rdf:resource="http://qallme.itc.it/ontology/qallme-tourism.owl#description"/>
	</qma:AnswersObject>
</rdf:RDF>
Again the qma:AnswerInstance is created but this time with the additional qma:isSpecifiedBy property which ranges over owl:DatatypeProperty instances (an instance of qmo:description in the example). The semantics of this is as follows: if the qma:isSpecifiedBy property doesn’t exist for a qma:AnswersObject, then the answers under the qma:hasAnswerValue property are the actual answers for the original question. Otherwise (i.e., if the qma:isSpecifiedBy property does exist) the answers under the qma:hasAnswerValue property are not the actual answers for the original question. In the latter case the actual answers can be retrieved by applying the datatype property in the value of qma:isSpecifiedBy on the answers under qma:hasAnswerValue.