semantic-web

How to Establish Relationships between rdfa lite nodes

孤人 提交于 2019-12-11 02:14:48
问题 trying to semantically mark up a report page about specific addresses. The page provides a report about the address's energy consumption and presents offers for a service related to the energy consumption. I would like to semantically represent the place's address, the energy report related to the address, and offers that are available to the address. Right now, I have markup that has an RDFa lite node for place and another node for the offers. What is the best way to structure this to

SPARQL apply MAX on a value of aggregation [duplicate]

試著忘記壹切 提交于 2019-12-11 01:49:25
问题 This question already has an answer here : SPARQL full aggregation on a group aggregation (1 answer) Closed 3 years ago . I have this query: prefix : <http://test.example/> select ?anotherUser (COUNT(?anotherItem) as ?countOfSharedLikedItems) WHERE { values ?user {:ania}. ?anotherUser :likes ?anotherItem. filter (?anotherUser != ?user) filter exists {?user :likes ?anotherItem} } group by ?anotherUser order by desc(?countOfSharedLikedItems) That runs on this data: @prefix : <http://test

SPARQL CONSTRUCT: does implicit subject/object influence the result?

牧云@^-^@ 提交于 2019-12-11 01:49:09
问题 I have a SPARQL CONSTRUCT like: CONSTRUCT { ?address schema:addressLocality ?city; schema:addressCountry ?country; schema:streetAddress ?addressLine; schema:postalCode ?zip; schema:addressRegion ?region. } WHERE { ?address schema:addressLocality ?city; schema:addressCountry ?country. OPTIONAL { ?address schema:streetAddress ?addressLine } OPTIONAL { ?address schema:postalCode ?zip } OPTIONAL { ?address schema:addressRegion ?region } } I'm getting fewer triples this way, than when the

How to build correct SPARQL Query

廉价感情. 提交于 2019-12-11 01:06:28
问题 I need to get all players who have ever played for football team using SPARQL query and dbpedia.org I can get current team members using http://dbpedia.org/sparql and this query: PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX p: <http://dbpedia.org/property/> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT * WHERE { <http://dbpedia.org/resource/Manchester_United_F.C.> p:name ?player. ?player dbpedia-owl:birthPlace ?city; dbpedia-owl:birthDate ?dob. } How to get all

How to display rdf file in web browser

社会主义新天地 提交于 2019-12-10 21:32:59
问题 I have some web services which return RDF file. Now I need to display this RDF file like: http://dbpedia.org/page/Berlin. Is there some Java library which can do this, because now it looks like just as XML. 回答1: Try Pubby, a Java webapp that can connect to an RDF data source and presents an HTML view. Usually the RDF data is stored in a SPARQL store, but you can also just load it from an RDF file using the conf:loadRDF configuration option. 回答2: Try Jena, it will parse the RDF into Java

Sesame 2.8.4 subquery limit bug fix?

江枫思渺然 提交于 2019-12-10 19:49:47
问题 It seems that there is bug in Sesame 2.8.4. If I have the following data set: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @prefix : <http://example.org/>. :a rdf:type :AClass . :a :hasName "a"^^xsd:string . :a :hasProperty :xa . :a :hasProperty :ya . :a :hasProperty :za . :b rdf:type :AClass . :b :hasName "b"^^xsd:string . :b :hasProperty :xb . :b :hasProperty :yb . :c rdf:type :AClass . :c :hasName "c"^^xsd:string . :c

How can I optimize a SPARQL query that returns optional properties?

北城余情 提交于 2019-12-10 18:28:25
问题 How can I optimize a SPARQL query like the following? The intent of this query is: Specify a resource (country resource where countryCode = "US" ) Get back optional properties defined on the resource. Unfortunately, the OPTIONAL blocks are being evaluated before the parent block, which causes the query engine to load all data for all countries. What I want is something like a LEFT OUTER JOIN behavior, but the query engine is not handling it this way. What can I do to improve query performance

Converting HTML to RDF

爷,独闯天下 提交于 2019-12-10 14:23:55
问题 I'm looking for a general purpose API/web service/tool/etc... that allows convert a given HTML page to an RDF graph as specific as possible (most probably using a back bone ontology and/or mapper). 回答1: Have you proved GRDDL? GRDDL is a technique for obtaining RDF data from XML documents and in particular XHTML pages. 回答2: I used XQuery to extract the data out of the given set of web pages. I had to write custom queries for the web pages. I think this is the most straight forward approach to

Dealing with non-semantic uses of “rel” in RDFa

…衆ロ難τιáo~ 提交于 2019-12-10 14:06:03
问题 I use RDFa to add linked data to my webpage. I also occasionally use the rel attribute in various tags for non-semantic purposes, such as triggering a javascript tooltip. I am wondering the there is something I can do to distinguish the uses. For instance, I have RDFa around my social network icons like so: <a rel="foaf:account" alt="twitter" href="https://twitter.com/cboettig"><i class="icon-twitter" rel="tooltip" title="follow me on twitter (reading, discussing)"></i></a> <a rel="foaf

How to query a particular DBpedia Resource/Page for multiple entities?

别说谁变了你拦得住时间么 提交于 2019-12-10 12:17:03
问题 I have links to a number of DBpedia pages like: http://dbpedia.org/resource/Harry_Potter http://dbpedia.org/resource/Twilight_(series) http://dbpedia.org/resource/Bible http://dbpedia.org/resource/Manga I would like to get the Abstract and Thumbnail entities for each one of them. I can get them individually using: For Abstract: PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX res: <http://dbpedia.org/resource/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http:/