Once triples have been imported, they are available for querying and reasoning. Additionally, triples can be scheduled for incremental addition and incremental deletion, which makes them available for incremental reasoning.
Thus, triples can be added programatically, read from files of certain formats, or extracted from an OWL 2 DL ontology.
Converting data to RDF-triple format
Converting data to RDF-triple format requires establishing a mapping pattern between the data source and the desired graph structure. The following provides an example of a mapping pattern for data in sql/csv format:
DATA SOURCE MAPPING PATTERN
This mapping is done in a two stage process using rules:
- The first step is to attach the datasource to RDFox as a relation. For example, each row of a table would become a table “type” relation and each column would become an argument of the relation.
- The second step is to map the arguments of the relation to the desired graph structure with rules.
In the following example, a company’s employee table is first converted to an employee relation and then mapped to the desired graph structure using a rule.
The materialisation of the following rule will generate the graph from the relation:
[?x, a, :employee] ,
[?x, :worksfor, :company] ,
[?x, :hasName, ?y] ,
[?x, :hasJob, ?z] :-
fg:employee(?x , ?y , ?z) .
The flexibility of rules means it is possible to import data from different data sources into a the graph by first populating the binary relations in the graph as well as creating new ones.
THE MANDATORY ATTRIBUTE PATTERN
Data can sometimes be incomplete especially when importing it from new data sources. RDFox can identify missing values or fill them in using a user defined strategy. This strategy can be applied during or after the import which improves the quality of the data.
For converting data to RDF-triples from XML or Json, contact us at email@example.com. For more information, to request a demo, or to start a free trial, click here.
Team and Resources
The team behind Oxford Semantic Technologies started working on RDFox in 2011 at the Computer Science Department of the University of Oxford with the conviction that flexible and high-performance reasoning was a possibility for data intensive applications without jeopardising the correctness of the results. RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. Oxford Semantic Technologies is a spin out of the University of Oxford and is backed by leading investors including Samsung Venture Investment Corporation (SVIC), Oxford Sciences Innovation (OSI) and Oxford University’s investment arm (OUI). The author is proud to be a member of this team.
Photo credit: Chuttersnap