14.10. Virtuoso Faceted 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 Faceted
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 Faceted 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 Faceted 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
Entity Label Lookup 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.
- Perform Network Resource Fetch of 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 Faceted Browser Search and Find User Interface to search for information on "CNET":
- Results of the following form should be returned for the network resource data being fetched.
- Click "Types" link shown at the right vertical Navigation
- Results of the classes/properties should be returned:
- To get Type description, click "Describe" link for a given type, for ex. "Person".
- A list of attributes and values should be presented for the given resource. Note that automatically is generated QRCode image for the described entity.
- Return back to the Attributes list from above by going to the "Facets" tab.
- To exclude a type, un-tick the checkbox associated with the type:
- Click the Type URI link
- Results of excluding the Type(s) should be shown:
- The Faceted 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>
- Click "New search" from the Entity Relations Navigation and go to "Entity Label Lookup" tab:
- In the Label auto-complete text box of the Entity Label Lookup tab, enter the name of an rdfs label to be Described:
- Select a URI from the list of available Labels to obtain a description of the URI:
- Click "Facets" and go to "Entity URI Lookup" tab:
- In the URI auto-complete text box of the Entity URI Lookup tab enter the name URI to be Described:
- 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. URI Labels
- Go to http://cname/fct
- Enter a free text search pattern (for example, "Camcorder" as consumer product), and click Search:
- Your initial query results page will display a list of literal value snippets where for each URL will be displayed a label:
- Click for ex. on the URL link of the first row result.
- The product description page should be shown and a list of Attributes and Values will be presented. An URL label of the product also will be shown: "Charges Lithium Ion 800 series batteries":
14.10.6. 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 network resource data being fetched.
- Click the "Types" link under "Entity Relations Navigation".
- Results about "Michael Jackson" as Type/Label/Count list should be displayed:
- You can navigate amongst the search results pages by using the "Prev" and "Next" buttons. Click for ex. "Next":
- Click a type link, for ex.:
http://dbpedia.org/class/yago/Artist109812338
- Should be shown type results and:
Displaying Ranked Entity Names and Text summaries where:
Entity1 has any Attribute with Value "Michael Jackson" Drop.
Entity1 is a yago:Artist109812338 . Drop
- Click the link:
- Results about "Michael Jackson" as Attribute/Value list should be presented:
- You can navigate amongst the search results pages by using the "First", "Prev", "Next" and "Last" buttons. Click for ex. "Last":
- "Metadata" tab.
- 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.7. Examples
Faceted Browsing Sample using LOD Cloud Cache data space
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
- You can perform Describe for a given found type, by clicking the "Describe" link in the "Type" column. For ex, for "atom:Entry" the produced describe type page would show a list of Attributes and Values + automatically generated QRCode image:
- Click "Facets" tab to return to the Types content page from the previous step.
- 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
- For Negation (filtering out) based on this Entity Type un-hatch the check-box shown besides the link:
- 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 "Entity Relations Navigation" click "Attributes".
- You can navigate amongst the search results pages by using the "Prev" and "Next" buttons. Click for ex. "Next":
- 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 "About: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 LOD data space:
- Click on one of the HTTP URIs in the filtered results-set to obtain a detailed structured
description of a given Entity i.e. about the person Kingsley Uyi Idehen. Each listed Property is
a Link; thus, each Property is a link to other structured Entity descriptions. Additionally,
a QRCode image will be produced automatically for the given entity:
- You can navigate amongst the search results pages by using the "First", "Prev", "Next" and "Last" buttons. Click for ex. "Last":
- Click on "Metadata" link to get a summary view of this Linked Data Space, "Source" ¨
and "Reference" 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 "InDirect" coreferences 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.
- Go to "Facets" and then from "Entity Relations Navigation" click "New Search".
- Enter a free text search pattern (for example, "Camcorder" as consumer product),
and click Search:
- Your initial query results page will display a list of literal value snippets where for
each URI will be displayed a label:
- Click for ex. on the URL link ofthe first row result.
- The product description page should be shown and a list of Attributes and Values will be
presented. An URI label of the product also will be shown: "CG-800":