• Keine Ergebnisse gefunden

Local as View and Global as View

RDF LOD

2.4 Local as View and Global as View

Named Entity Recognition:An input question is parsed to identify the sequence of words that represent a person, a thing, or any other entity. For example question, the entityIndiais recognised by a NER component.

Named Entity Disambiguation:The identity of the entity in the text is retrieved and then linked to its mentions in knowledge graph. An ideal NED component will disambiguateIndiatodbr:India.

Linguistic Triple Generation:Based on the input natural language question, triple patterns of the form hquery term,relation,termiare generated [46]. A sample triple is<India,timeZone,?>.

Data Mapping: Information generated by Query Analyser such as entities and tokens is mapped to its mentions in online knowledge bases such as DBpedia. The triple from triple generator is mapped to

<dbr:India,dbo:timeZone,?>.

Query Generating: SPARQL queries are constructed; generated queries represent input questions over entities and predicates in online knowledge bases. A corresponding SPARQL query is constructed by a query builder component as:

PREFIX dbr: <http://dbpedia.org/resource/>

PREFIX dbo: <http://dbpedia.org/ontology/>

SELECT DISTINCT ?uri WHERE { dbr:India dbo:timeZone ?uri }

Answer Generating: The SPARQL queries are executed on the end points of knowledge bases to obtain the final answer. The expected correct answer of the SPARQL query is http://dbpedia.

org/resource/Indian_Standard_Time.

Other QA Tasks

• Question Type Identification: This task identifies the type of the question. The input is the natural language question; the output is the type of the question, e.g., “yes-no”, “location”,

“person”,“misc”, “time”, or “reason”. For exemplary question, question type is misc.

• Answer Type Identification: This task identifies the desired type of the final answer. In our example, answer type is list. This task is sometimes performed as a part of the Question Analysis task or as a subtask of Answer Generation.

• Query Ranking: In some of the QA systems, the task Query Generation generates multiple candidate queries. This task ranks the generated SPARQL queries using a ranking function and it helps to select the best ranked query.

2.4 Local as View and Global as View

In data integration systems, the aim is to integrate data from various sources and provide a uniform view of them. These systems are generally defined as a triple <G,S,M> where G is the global schema, S is the heterogeneous groups of source schemas, and M is the mapping between G and S. TheView-based data integrationframeworks address the problem of data integration by coupling the data sources into a single

Chapter 2 Background

Entities Relations

SkyRocket(x) Lorry(x) Shipment(x)

launches(x,y) supplies(x,y)

Global Schema

Local Schema

Source S1 Source S2

hasShipment(x,y) transports(x,y)

Figure 2.4:Data Integration Example.Two different sourcesS1andS2that consist of local schemas have to be aligned with the global schema. The global schema describes three entities and two relations between them.

unified view. In a data integration system, the view presented to the user as theGlobal Schema. This view is a unified view of all the heterogeneous data sources. The user runs queries on the Global schema, and system access many local views to combine data from these views to provide a final answer to the user query. There are two basic approaches to provide mapping in a data integration system [47]. These are: Global-As-View (GAV) and Local-As-View(LAV) approaches. The LAV mappings are formally defined as:

Local-as-View (LAV) [47]

Definition 2.4.1 In a data integration systemIS=hO,S,Mibased on LAV approach the mapping M associates to each source in S a query qOin terms of the global schema O:

s→qO

That is, the sources are represented as a view over the global schema.

In contrast with LAV mappings, GAV mappings define the principles about the creation of a global database from the local databases, querying in a GAV approach is straightforward. GAV approach performs well when sources are stable. Local As View (LAV) approach overcomes the limitations of GAV. The LAV approach requires each source to have an associated view over the global schema. The LAV approach follows the exact opposite methodology of a GAV and defines each local schema as a function of the global schema and assume global schema as fixed. GAV mappings are formally defined:

24

2.4 Local as View and Global as View

Global-as-View (LAV) [47]

Definition 2.4.2 In a data integration systemIS=hO,S,Mibased on GAV approach the mapping M associates to element in the global schema O a query qS in terms of the sources S :

o→qS

That is, the elements of the global schema are represented as a view over the sources.

We have utilised the power of LAV mappings to describe QA components in form of views to their semantic description. We then utilised these views to provide valid (in terms of input-output requirements of the components) composition of QA pipelines (for details please see Chapter7). Figure 2.4illustrates two local sources S1 and S2 with their individual schema which is expected to be aligned to global schema O. The global schema defines three concepts SkyRocket(x), Lorry(x), Shipment(x) and two relations, namely launch(x,y) that explains that some SkyRocket launches some Shipment, and supply(x,y) that describes that some Lorry supplies some Shipment. Source S1 contains relations in the form hasShipment(x,y) related to skyrocket and shipment but without explicit class assignment of variables x and y. Furthermore, source S2 contains relation transports(x,y) that implicitly links lorry and shipment. This example explains a typical data integration task. The LAV mappings are defined as below where relations in S1 and S2 are mapped as a conjunctive query over the concepts in global schema.

hasShipment(x,y) := launches(x,y),SkyRocket(x),Shipment(y) transports(x,y) := supplies(x,y),Lorry(x),Shipment(y)

In contrast to LAV mappings, GAV performs well when source is stable. Applying GAV mapping over our data integration example illustrated in the Figure2.4, the concepts are determined as a conjunctive query over local relations from S 1 or S 2. Some of GAV mappings are given below:

launches(x,y) := hasShipment(x,y) SkyRocket(x) := hasShipment(x,y) Shipment(y) := hasShipment(x,y) supplies(x,y) := transports(x,y) Lorry(x) := transports(x,y) Shipment(y) := transports(x,y)

C H A P T E R 3