Question: How to perform the selection of subsets of RDF?
Evidence: Commonly, the selection of subsets of RDF is performed using the SPARQL query language. SPARQL can be used to express queries across diverse data sources. Query forms contain variables that appear in a solution result. They can be used to select all or a subset of the variables bound in a pattern match. They exist in four different instantiations, i.e., SELECT, CONSTRUCT, ASK and DESCRIBE. The SELECT query form is the most commonly used and is used to return rows of variable bindings. Therefore, we use this type of query in our explanation. CONSTRUCT allows to create a new RDF graph or modify the existing one through substituting variables in a graph templates for each solution. ASK returns a Boolean value indicating whether the graph contains a match or not. Finally, DESCRIBE is used to return all triples about the resources matching the query. For example, represents the following query “Return all scientists who were born in Ulm”.


A SPARQL SELECT query can be regarded as consisting of three parts: (1) a body section B, which describes all data that has to be retrieved, (2) an optional section O, which describes the data items that can be retrieved by the query if they exist, and (3) a modifier section M, which describes all solution sequences, modifiers and aggregates that are to be applied to the result of the previous two sections of the query. Let Var be the set of all variables that can be used in a SPARQL query. In addition, let $R$ be the set of all resources, $P$ the set of all properties and $L$ the set of all literals contained in the target knowledge base of the SPARQL queries at hand. We call $x \in \text{\em Var}\, \cup R \cup P \cup L$ an atom. The basic components of the body of a SPARQL query are triple patterns $(\texttt {s}, \texttt {p}, \texttt {o}) \in (\text{\em Var}\, \cup R) \times (\text{\em Var}\, \cup P) \times (\text{\em Var}\, \cup R \cup L)$. Let $W$ be the set of all words in the dictionary of our target language. We define the realization function $\rho : \text{\em Var}\, \cup R \cup P \cup L \rightarrow W^*$ as the function which maps each atom to a word or sequence of words from the dictionary. The extension of $\rho $ to all SPARQL constructs maps all atoms $x$ to their realization $\rho (x)$ and defines how these atomic realizations are to be combined. We denote the extension of $\rho $ by the same label $\rho $ for the sake of simplicity. We adopt a rule-based approach to achieve this goal, where the rules extending $\rho $ to all valid SPARQL constructs are expressed in a conjunctive manner. This means that for premises $P_1,\ldots ,P_n$ and consequences $K_1,\ldots ,K_m$ we write $P_1 \wedge \ldots \wedge P_n \Rightarrow K_1 \wedge \ldots \wedge K_m$. The premises and consequences are explicated by using an extension of the Stanford dependencies.
For example, a possessive dependency between two phrase elements $e_1$ and $e_2$ is represented as $\texttt {poss}(e_1,e_2)$. For the sake of simplicity, we slightly deviate from the Stanford vocabulary by not treating the copula to be as an auxiliary, but denoting it as BE. Moreover, we extend the vocabulary by the constructs conj and disj which denote the conjunction resp. disjunction of two phrase elements. In addition, we sometimes reduce the construct $\texttt {subj(y,x)}\wedge \texttt {dobj(y,z)}$ to the triple (x,y,z) $\in W^3$.
Commonly, the selection of subsets of RDF is performed using the SPARQL query language.
Answer: Commonly, the selection of subsets of RDF is performed using the SPARQL query language.