rdf

What is the difference between rdf:_1…rdf_n and rdf:_li?

核能气质少年 提交于 2019-12-13 05:11:37
问题 What is the difference between rdf:_1....rdf_n and rdf:_li ? Can I use these in all rdf container (Seq, Bag, Alt) or not? 回答1: The :_n properties are equivalent to the :li properties used in order. Anywhere where you're using :_1 , :_2 , etc., in order, you can use :li . Not only can you use them with all the RDF containers, you can use them with other resources too. From the RDF/XML Syntax Specification (emphasis added): 2.15 Container Membership Property Elements: rdf:li and rdf:_n RDF has

Extract schema from rdf/xml

核能气质少年 提交于 2019-12-13 04:55:36
问题 I am making use of a tool called as FRED (http://wit.istc.cnr.it/stlab-tools/fred) , which generates the RDF/XML for the given natural language text. But that tool is making use its own predefined schema and also the namespaces. There is no way for the user to give their own schema for the tool. Whatever the RDF/XML data, which I have got from that tool is fed to Triple Data Store using Apache JENA library. Is it possible to extract the Schema like class properties, objects and Data

how to define a 'co-participate' property in OWL or RDFS?

两盒软妹~` 提交于 2019-12-13 04:52:19
问题 I'd like to know how to express the concept that: if 2 agents are participants in one event, they should be linked with a symmetric property 'co-participate'. I feel I could make some restrictions but don't know how. The event ontology is defined here: http://motools.sourceforge.net/event/event.html 回答1: if 2 agents are participants in one event, they should be linked with a symmetric property 'co-participate'. You can do this in OWL2 by using a sub-property chain axiom. Since the data looks

Merge RDF .ttl files into one file database - filtering and keeping only the data/triples needed

梦想与她 提交于 2019-12-13 04:18:47
问题 I need to merge 1000+ .ttl files into one file database. How can I merge them with filtering the data in the source files and keep only the data needed in the target file? Thanks 回答1: There's a number of options, but the simplest way is probably to have use a Turtle parser to read all the files, and let that parser pass its output to a handler which does the filtering before in turn passing the data to a Turtle writer. Something like this would probably work (using RDF4J): RDFWriter writer =

How to get associated (English) Wikipedia page from Wikidata page / Q number using Wikidata dump?

我的未来我决定 提交于 2019-12-13 04:03:42
问题 For @en text alone, a single item from the Wikidata dump contains multiple names: <http://www.wikidata.org/entity/Q26> <http://www.w3.org/2000/01/rdf-schema#label> "Northern Ireland"@en . <http://www.wikidata.org/entity/Q26> <http://www.w3.org/2004/02/skos/core#prefLabel> "Northern Ireland"@en . <http://www.wikidata.org/entity/Q26> <http://schema.org/name> "Northern Ireland"@en . On the Wikidata page for this article (http://www.wikidata.org/entity/Q26), which of these (if any) corresponds to

why this variable is never have a value

僤鯓⒐⒋嵵緔 提交于 2019-12-13 02:57:29
问题 I am checking that if an instance has a value for a specific predicate, bound that value to a specific variable, otherwise, bound that variable to the value 1 of type integer. this is my code select ?boosted where { :r1 a ?x optional { ?item rs:boostedBy ?boostedOptional bind (if(bound(?boostedOptional), ?boostedOptional, "1"^^xsd:integer) as ?boosted) } } the value of ?boosted is always empty, look please why please? Note I think you don't need data to test why my code is not working,

When i declare property how to use it

南笙酒味 提交于 2019-12-13 02:56:35
问题 I use RDF/XML to represent some data. First of all i want to show that a person knows other person, i declare the property and i use the following code to specify that mark knows katrin and katrin knows john PART 1 <rdf:Property rdf:about="Know"> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="#Person"/> </rdf:Property> PART2 <rdf:Description rdf:about="#Mark"> <dc:Knows rdf:resource="#Katrin"/> </rdf:Description> <rdf:Description rdf:about="#Katrin"> <dc:Knows rdf:resource="

RdfParseException: Unexpected Character (Code 114) r was encountered

ぃ、小莉子 提交于 2019-12-13 02:23:56
问题 I am trying to send the following query to DBpedia using dotNetRDF: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX temp: <http://www.example.com/temp/> CONSTRUCT { ?v1 a temp:r. ?v1 temp:p0 ?v2. } WHERE { OPTIONAL { { { SELECT ?v1 WHERE { ?v1 rdfs:comment ?v2. } LIMIT 10 }. ?v1 rdfs:comment ?v2. }. }. } However, I am getting an RdfParseException saying that an unexpected r

SPARQL limiting the query result by a variable instead of the number of rows

白昼怎懂夜的黑 提交于 2019-12-13 02:12:48
问题 Lets say I have the following data set: :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 :hasProperty :xc I want to query the data set to give me back everything of an instance of :AClass , but only for two instances. I know I have to use the LIMIT keyword, and I have tried a lot of queries but

SPARQL query results in Protege does not recognize transitive property

徘徊边缘 提交于 2019-12-13 01:43:27
问题 I have almost the same requirement expresed in this question: Get all nodes in a transitive relation I am using Protege 3.4.8. This is an Owl-Lite project. I have a transitive property "contains", which is defined as an object property of type Node Node has descendants of type A, B and C I have individuals that link to each other through contains property like this: A contains B contains C When I run the following SPARQL query: SELECT ?A ?B WHERE { ?A :contains ?B } I get : A1 B1 B1 C1 Due to