Next episode: click here
Hello and welcome to another episode of the RDFox introductory series.
In this episode, we're going to be having a look at rules that contain filters in their bodies. If you haven't already, please do check out our previous videos on the foundations of Reasoning and the anatomy of rule so that you can understand everything that we're talking about today.
Filters are an incredibly powerful tool within the body of a rule because they enable us to encode the nuances of complex human. Norwich. Here for example will be looking at Formula One podiums and drivers who have finished 1st, 2nd, or 3rd in a race.
Now, in order to do this, we need to do more than just describe the pattern of the data where our drivers have finished in these positions. We also need to add this filter that says the position must be 1st, 2nd, or 3rd, and so that's exactly what we've done here.
In the body here you can see that we have described our result with an associated race, driver and position order. This value, position order, is going to be 1st, 2nd, 3rd, 10th, last, whatever it happens to be, but crucially, because it can take any of those finishing values, we then need to add this filter whereby position order must be less than four, in other words 1, 2, or 3. When those conditions are met, both the triple pattern and the filter conditions, then we will infer the head. In this case, a new relationship has podium in race, connecting a driver directly to the race they've raced in.
Filters are incredibly versatile tools and can be used in just about every use case. Everything from advanced analytics, dashboarding, or even things like predictive maintenance, where thresholds and values are incredibly important.
If you’d like to learn more about Datalog and the functions that it has to offer, please do check out our other videos in the series.
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 Enterprises (OSE) and Oxford University Innovation (OUI).