OWLIM-SE RDF Rank

Skip to end of metadata
Go to start of metadata
Search
This documentation is NOT for the latest version of GraphDB.

Latest version - GraphDB 7.1

OWLIM Documentation

Next versions

OWLIM 5.0
OWLIM 5.1
OWLIM 5.2
OWLIM 5.3
OWLIM 5.4

GraphDB 6.0 & 6.1
GraphDB 6.2
GraphDB 6.3
GraphDB 6.4
GraphDB 6.5
GraphDB 6.6
GraphDB 7.0
GraphDB 7.1

Previous versions

OWLIM 4.3
OWLIM 4.2
OWLIM 4.1
OWLIM 4.0

Introduction

RDF Rank is an algorithm that identifies the more important or more popular entities in the repository by examining their interconnectedness. The popularity of entities can then be used to order query results in a similar way to internet search engines, such as how Google orders search results using PageRank http://en.wikipedia.org/wiki/PageRank.
The RDF Rank component computes a numerical weighting for all the nodes in the entire RDF graph stored in the repository, including URIs, blank nodes and literals. The weights are floating point numbers with values between 0 and 1 that can be interpreted as a measure of a node's relevance/popularity.
Since the values range from 0 to 1, the weights can be used for sorting a result set (the lexicographical order works fine even if the rank literals are interpreted as plain strings). Here is an example SPARQL query that uses RDF rank for sorting results by their popularity:

PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
PREFIX opencyc-en: <http://sw.opencyc.org/2008/06/10/concept/en/>
SELECT * WHERE {
  ?Person a opencyc-en:Entertainer .
  ?Person rank:hasRDFRank ?rank .
}
ORDER BY DESC(?rank) LIMIT 100

As seen in the example query, RDF Rank weights are made available via a special system predicate. Triple patterns with the predicate http://www.ontotext.com/owlim/RDFRank#hasRDFRank are handled specially by OWLIM, where the object of the statement pattern is bound to a literal containing the RDF Rank of the subject.
In order to use this mechanism the RDF ranks for the whole repository must be computed in advance. This is done by executing a series of SPARQL ASK queries to parameterise the weighting algorithm, followed by a query that triggers the computation itself.

Parameters

Parameter Maximum iterations
Predicate http://www.ontotext.com/owlim/RDFRank#maxIterations
Description Sets the maximum number of iterations of the algorithm over all entities in the repository.
Default 20
Example PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
ASK { rank:maxIterations rank:setParam "16" . }
Parameter Epsilon
Predicate http://www.ontotext.com/owlim/RDFRank#epsilon
Description Used to terminate the weighting algorithm early when the total change of all RDF Rank scores has fallen below this value.
Default 0.01
Example PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
ASK { rank:epsilon rank:setParam "0.05" . }

Full computation

To trigger the computation of the RDF Rank values for all resources use the following query:

PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
ASK { _:b1 rank:compute _:b2. }

Incremental updates

The full computation of RDF Rank values for all resources can be relatively expensive. When new resources have been added to the repository after a previous full computation of RDF Rank vales, then either a full re-computation can be done for all resources (see above) or only the RDF Rank values for the new resources can be computed (an incremental update). The following control query:

PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
ASK {_:b1 rank:computeIncremental "true"}

will compute RDF Rank values for those resources that do not have an associated value, i.e. the have been added to the repository since the last RDF Rank computation.

The incremental computation uses a different algorithm that is lightweight (in order to be fast), but is not as accurate as the proper ranking algorithm. As a result of this, ranks assigned by the proper and the lightweight algorithms might diverge slightly from each other.

Exporting RDF Rank values

The computed weights can be exported to an external file using a query of this form:

PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
ASK { _:b1 rank:export "/home/user1/rdf_ranks.txt" . }

The query will return true if the export was successful, false otherwise. If the export failed then an error message will be recorded in the log file.

Lastly, when using RDF Priming, the RDF Rank values can be used as the initial activation values. To set this up, use the following query:

PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
ASK { _:b1 rank:ranksAsWeights _:b2 . }
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.