14.10. Virtuoso Facet Browser Installation and configuration
14.10.1. Prerequisites
Requires Virtuoso 6.0 TP1 or higher for use.
14.10.2. Pre Installation
Note: This step is not required for Virtuoso Release 6.1 and above builds
If you have an existing Virtuoso 6.x installation, and your Quad Store has greater than
10K worth of triples, please perform the following steps:
- Run the following commands using the Virtuoso isql program before installing the Facet
Browser VAD:
drop index RDF_QUAD_OPGS;
drop index RDF_QUAD_POGS;
drop index RDF_QUAD_GPOS;
drop index RDF_QUAD_OGPS;
checkpoint;
create table R2 (G iri_id_8, S iri_id_8, P iri_id_8, O any, primary key (S, P, O, G));
alter index R2 on R2 partition (S int (0hexffff00));
log_enable (2);
INSERT INTO R2 (G, S, P, O) select G, S, P, O FROM rdf_quad;
DROP TABLE RDF_QUAD;
ALTER TABLE r2 rename RDF_QUAD;
checkpoint;
create bitmap index RDF_QUAD_OPGS on RDF_QUAD (O, P, G, S) partition (O varchar (-1, 0hexffff));
create bitmap index RDF_QUAD_POGS on RDF_QUAD (P, O, G, S) partition (O varchar (-1, 0hexffff));
create bitmap index RDF_QUAD_GPOS on RDF_QUAD (G, P, O, S) partition (O varchar (-1, 0hexffff));
checkpoint;
Note this step may take sometime depending on how many triples are already in your Quad Store.
14.10.3. VAD Package Installation
- Download and install the Virtuoso Facet Browser VAD
package using the Conductor System Admin - > Packages tab.
- The HTML interface of the Faceted Browser Engine is exposed at: http://<cname>/fct,
where "cname" is the hostname:portno your Virtuoso instance is running on.
- The Facet Browser Engine exposes a REST API at the endpoint:
http://<cname>/fct/service.
14.10.4. Post Installation
- Build Full Text Indexes by running the following commands using the Virtuoso
isql program:
RDF_OBJ_FT_RULE_ADD (null, null, 'All');
VT_INC_INDEX_DB_DBA_RDF_OBJ ();
- Run the following procedure using the Virtuoso isql program to
populate label lookup tables periodically and activate the Label text box of the
URI Lookup(by Label) tab:
- Run the following procedure using the Virtuoso isql program to calculate the IRI ranks.
Note this should be run periodically as the data grows to re-rank the IRIs.
- Sponge some data to load some RDF triples in the quad store. This can easily be done using
the Virtuoso description.vsp page which provides a hypertext description of RDF Linked Data, by describing
the following page for example (or one of your choice):
http://cname/about/html/http/news.cnet.com
- Use the Facet Browser Search and Find User Interface to search for information on "CNET"
- Results of the following form should be returned for the data sponged.
- Click "Types" link shown at the right vertical Navigation
- Results of the classes/properties should be returned:
- To exclude a type unhatch the checkbox associated with the type:
- Click the Type URI link
- Results of excluding the Type(s) should be shown:
- The Facet Browser Web service endpoint can also be queried to obtain the same results:
$ more cnet.xml
<?xml version="1.0"?>
<query xmlns="http://openlinksw.com/services/facets/1.0" inference="" same-as="">
<text>CNET</text>
<view type="text" limit="20" offset=""/>
</query>
$ curl -H "Content-Type: text/xml" -d @cnet.xml http://cname/fct/service
<fct:facets xmlns:fct="http://openlinksw.com/services/facets/1.0/">
<fct:sparql> SELECT ?s1 as ?c1, (bif:search_excerpt (bif:vector ('CNET'), ?o1)) as ?c2, ?sc, ?rank WHERE {{{ SELECT ?s1, (?sc * 3e-1) as ?sc, ?o1, (sql:rnk_scale (<LONG::IRI_RANK> (?s1))) as ?rank WHERE { ?s1 ?s1textp ?o1 . ?o1 bif:contains '"CNET"' option (score ?sc) . } ORDER BY DESC (?sc * 3e-1 + sql:rnk_scale (<LONG::IRI_RANK> (?s1))) LIMIT 20 OFFSET 0 }}}</fct:sparql>
<fct:time>16</fct:time>
<fct:complete>yes</fct:complete>
<fct:timeout>0</fct:timeout>
<fct:db-activity> 131R rnd 36R seq 0P disk 0B / 0 messages</fct:db-activity>
<fct:result type="text">
<fct:row>
<fct:column datatype="trank">4.5</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.com">http://news.com</fct:column>
<fct:column>Technology News - CNET News</fct:column>
<fct:column><span class="srch_xerpt"><b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">4.5</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com/2547-1_3-0-20.xml">http://news.cnet.com/2547-1_3-0-20.xml</fct:column>
<fct:column>CNET News.com</fct:column>
<fct:column><span class="srch_xerpt"><b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">4.5</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com">http://news.cnet.com</fct:column>
<fct:column>Technology News - CNET News</fct:column>
<fct:column><span class="srch_xerpt"><b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3.9</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.com">http://news.com</fct:column>
<fct:column>Technology News - CNET News</fct:column>
<fct:column><span class="srch_xerpt">Technology News <b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3.9</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com">http://news.cnet.com</fct:column>
<fct:column>Technology News - CNET News</fct:column>
<fct:column><span class="srch_xerpt">Technology News <b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.com">http://news.com</fct:column>
<fct:column>Technology News - CNET News</fct:column>
<fct:column><span class="srch_xerpt">Tech news and business reports by <b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com/2547-1_3-0-20.xml">http://news.cnet.com/2547-1_3-0-20.xml</fct:column>
<fct:column>CNET News.com</fct:column>
<fct:column><span class="srch_xerpt">Tech news and business reports by <b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com">http://news.cnet.com</fct:column>
<fct:column>Technology News - CNET News</fct:column>
<fct:column><span class="srch_xerpt">Tech news and business reports by <b>CNET</b> News.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.com#6">http://news.com#6</fct:column>
<fct:column>There's an electric car in your future</fct:column>
<fct:column><span class="srch_xerpt">... <b>CNET</b> Car Tech posts photos of electric cars expected to come out by 2011.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com/2547-1_3-0-20.xml#9">http://news.cnet.com/2547-1_3-0-20.xml#9</fct:column>
<fct:column>There's an electric car in your future</fct:column>
<fct:column><span class="srch_xerpt">... <b>CNET</b> Car Tech posts photos of electric cars expected to come out by 2011.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com#9">http://news.cnet.com#9</fct:column>
<fct:column>There's an electric car in your future</fct:column>
<fct:column><span class="srch_xerpt">... <b>CNET</b> Car Tech posts photos of electric cars expected to come out by 2011.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.com#6">http://news.com#6</fct:column>
<fct:column>There's an electric car in your future</fct:column>
<fct:column><span class="srch_xerpt">... <b>CNET</b> Car Tech posts photos of electric cars expected to come out by 2011.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com/2547-1_3-0-20.xml#9">http://news.cnet.com/2547-1_3-0-20.xml#9</fct:column>
<fct:column>There's an electric car in your future</fct:column>
<fct:column><span class="srch_xerpt">... <b>CNET</b> Car Tech posts photos of electric cars expected to come out by 2011.</span></fct:column>
</fct:row>
<fct:row>
<fct:column datatype="trank">3</fct:column>
<fct:column datatype="erank">5.881291583872905e-014</fct:column>
<fct:column datatype="url" shortform="http://news.cnet.com#9">http://news.cnet.com#9</fct:column>
<fct:column>There's an electric car in your future</fct:column>
<fct:column><span class="srch_xerpt">... <b>CNET</b> Car Tech posts photos of electric cars expected to come out by 2011.</span></fct:column>
</fct:row>
</fct:result>
</fct:facets>
- In the Label text box of the URI Lookup (by Label)
tab enter the name of a rdfs label to be Describe'd:
- Select a URI from the list of available Labels to obtain a description of the URI:
- In the URI text box of the URI Lookup tab enter
the name URI to be Describe'd:
- Select a URI from the list of available Labels to obtain a description of the URI:
- If data is loaded into the quad store via DML functions (TTLP, RDF_LOAD_RDFXML etc.) the
following procedure needs to run from isql to build the free text indexes required each time:
VT_INC_INDEX_DB_DBA_RDF_OBJ ()
14.10.5. Usage Statistics
- Use the Faceted Browser Search and Find User Interface to search for information on "Michael Jackson":
- Results of the following form should be returned for the data sponged:
- Click the "Types" link under "Navigation"
- Results about "Michael Jackson" as Type/Label/Count list should be returned.
- Click a type link, for ex.:
- Should be shown type results and:
Displaying types of e1 where:
e1 has any property whose value contains "Michael Jackson".
e1 is a dbpedia-owl:Artist . Drop
- Click the "Show values" link under "Navigation"
- Results should be shown for "Michael Jackson" as values and text summaries associated with pattern:
Displaying values and text summaries associated with pattern e1 where:
e1 has any property whose value contains "Michael Jackson".
e1 is a dbpedia-owl:Artist . Drop
- Click the link:
- Results about "Michael Jackson" as property/value list should be returned:
- Click the "Usage Statistics" link under "Actions" shown right of the list.
- Results of usage statistics for "Michael Jackson" grouped in 4 tabs should be shown:
- Referenced by Graphs: shows how many times the URI is found as subject in the relevant graph(s):
SPARQL
SELECT ?g count (*)
where
{
graph ?g { <URI> ?p ?o }
}
group by ?g
order by desc 2
limit 20
- Source Graphs: shows how many times the URI is found as object in the relevant graph(s):
SPARQL
SELECT ?g count (*)
where
{
graph ?g { ?s ?p <URI> }
}
group by ?g
order by desc 2
limit 20
- Direct co-references: shows results as subject and calculated rank, based on running transitive closure over owl:sameAs of the URI in subject or object:
SPARQL
SELECT ?syn ( sql:rnk_scale (<LONG::IRI_RANK> (?syn)))
where
{
{ SELECT ?s ?syn
where
{
{?syn owl:sameAs ?s } union {?s owl:sameAs ?syn}
}
}
option (transitive, t_distinct, t_min (0), T_in (?s), t_out (?syn)) . filter (!isliteral (?syn) && ?s = <URI> )
}
order by desc 2
limit 20
- Indirect co-references: shows expanded results for objects concur with the URI by IFP:
SPARQL
SELECT distinct ?syn ?p ?o (sql:rnk_scale (<LONG::IRI_RANK> (?syn)))
where
{ <URI> ?p ?o . filter (0 != (<LONG::bif:rdf_is_sub> ("b3sifp", ?p, lod:ifp_like, 3))) .
?syn ?p ?o .
}
order by desc 4
limit 20
14.10.6. Examples
Example for Use Faceted Navigation to Explore Virtuoso hosted Linked Data
The following example demonstrates a simple scenario of tracking Kingsley Idehen's conversations
across the Web, using the Virtuoso Faceted Browser hosted on LOD.
- Go to http://lod.openlinksw.com/fct/
- Enter a free text search pattern (for example, "Kingsley Idehen"), and click Search
- Your initial query results page will display a list of literal value snippets from property
values associated with the query text pattern
- Using the Navigation section on the right, click on "Types", which alters the contents
of the query results area by presenting CURIE based hyperlinks for each of the Entity Types associated
with Property values that contains the query text pattern
- Click on the "foaf:Person" link to narrow the result set down to Entities of this Type,
un-hatch the checkbox beside this link for Negation (filtering out) based on this Entity Type
- You can filter further, by switching (pivoting) to the a Property based view, by returning
to the Navigation section and then clicking on "Properties" or "Referencing Properties" links; in either
case, you have further filtering of based on the combination of Properties and Entities where Entities
in the result-set contain values matching the query text pattern
- From the list of Property Types, click on the "foaf:interest" link to filter further,
based on the values of this property
- From the list of "foaf:interest" Values, click on "dbpedia:Linked_Data", which filters
the result-set further to display reveal Entity Identifier Links (Generic HTTP URIs) and Labels for
each "foaf:Person" associated with the property "foaf:interest", in the URIBurner data space.
- Click on one of the HTTP URIs in the filtered results-set to obtain a detailed structured
description of a given Entity. Each listed Property is a Link; thus, each Property is a link to other
structured Entity descriptions
- Click on "Usage Statistics" link to get a summary view of this Linked Data Space,
"Reference" and "Source" graphs are akin to saying "Table X" and "Table Y" where each table
is the container of Records re. RDBMS or Worksheet re. Spreadsheet.:
- "Direct" and "In-Direct" co-references show other references (Identifiers) that relate
associated with Kingsley Idehen (like saying: here are his other names or his know by this name in
this other place)
- Click on "Settings" check "owl:sameAs" and it sets a context mode for the session
(meaning: a set of rules to take place)
- Go back to the "Direct Co-reference" tab
- As result each link will unveil a union (combination) of all the the data associated
with all Kingsley Idehen's other Identifiers (other Names in other places), i.e., they all show the
same data.