forked from marklogic-community/semantic-news-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
facets.xml
93 lines (77 loc) · 2.84 KB
/
facets.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!-- This file centralizes the configuration of triples-based
facets, including all aspects from loading the relevant triples
into document properties, to creating the needed indexes, to
rendering the facet names, to configuring which queries
can be expanded.
-->
<facets>
<facet name="cat"
display="Article Category"
index-name="category"
type="string"
collation="http://marklogic.com/collation/"
rdf-property="http://s.opencalais.com/1/pred/categoryName">
<!-- What triples to store with the document properties.
This SPARQL query will get run once for each document
(at build time). -->
<sparql><![CDATA[
CONSTRUCT {
?DocCat $facetProperty ?cat .
}
FROM <http://www.bbc.co.uk/news/graph>
WHERE {
?DocInfo owl:sameAs $docId .
?DocCat c:docId ?DocInfo ;
$facetProperty ?cat .
}
]]></sparql>
</facet>
<facet name="org"
display="Types of organizations mentioned"
index-name="orgtype"
type="string"
collation="http://marklogic.com/collation/"
rdf-property ="http://s.opencalais.com/1/pred/organizationtype"
expandable-via="http://s.opencalais.com/1/pred/name">
<sparql id="relevance-based"><![CDATA[
CONSTRUCT {
?thing $facetProperty ?thingtype .
}
FROM <http://www.bbc.co.uk/news/graph>
WHERE {
?DocInfo owl:sameAs $docId .
?RelevanceInfo c:docId ?DocInfo ;
c:subject ?thing .
?thing $facetProperty ?thingtype .
}
]]></sparql>
</facet>
<facet name="product"
display="Product types mentioned"
index-name="producttype"
type="string"
collation="http://marklogic.com/collation/"
rdf-property ="http://s.opencalais.com/1/pred/producttype"
expandable-via="http://s.opencalais.com/1/pred/name"
sparql-idref="relevance-based"/>
<facet name="person"
display="Types of people mentioned"
index-name="persontype"
type="string"
collation="http://marklogic.com/collation/"
rdf-property ="http://s.opencalais.com/1/pred/persontype"
expandable-via="http://s.opencalais.com/1/pred/name"
sparql-idref="relevance-based"/>
<facet name="event"
display="Types of political events mentioned"
index-name="politicaleventtype"
type="string"
collation="http://marklogic.com/collation/"
rdf-property ="http://s.opencalais.com/1/pred/politicaleventtype"
expandable-via="http://s.opencalais.com/1/pred/name"
sparql-idref="relevance-based"/>
<sparql-prefixes><![CDATA[
PREFIX c: <http://s.opencalais.com/1/pred/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
]]></sparql-prefixes>
</facets>