semantic-web

is it correct that a class can be an instance?

杀马特。学长 韩版系。学妹 提交于 2019-12-07 13:29:20
In this document https://www.w3.org/TR/rdf-schema/#ch_introduction it is written: rdfs:Resource is an instance of rdfs:Class. however it is also written: This is the class of everything is this a typo? can a class be an instance ? That's actually an interesting question. I just want to add to your comment in CaptSolo's answer: but can I define my custom classes as instances of an instance? ( i highly doubt that ) It's not so much a question of whether you "can" do something or not (at least not in this case), but rather whether what you do will make sense. After all the Semantic Web was built

Defining DataRange Expression in Protege for a Data Type Property

此生再无相见时 提交于 2019-12-07 07:36:01
问题 I am adding few new DataType in the OWL using Protege. The DataType is like percentage and I want to specify it's range with the double value ranging from 0 to 100. Similarly a DataType named Quality and I want to specify it's range with the double value ranging from 0 to 1. How can we specify these things in the Data range Expression ? I tried to find out but I found two links but not useful in my context. How to Define My Own Ranges for OWL DataProperties This is useful if we are manually

Semantic mediawiki #ask query: Displaying nested properties on the same query

China☆狼群 提交于 2019-12-07 07:27:11
问题 I would like to display in the same query properties of a page which is related to the pages im querying for. Let's say I would like to query all the pages in the City category, which are located in Germany, and I want to display the title of the page, but also I want to display the surface data of Germany, for example. Something like this: {{#ask: [[Category:City]] [[location::Germany]] |?mainlabel |?Location.surface }} I know this wont work, but you can see what I want to achieve. 回答1: I'm

What's the difference between using RDFS/OWL and XML?

為{幸葍}努か 提交于 2019-12-07 07:01:26
Mainly, I was wondering what advantages the ontology languages of RDFS/OWL has over using a markup system (such as http://www.schema.org/ ) for managing and creating metadata? I'm still very confused about how different concepts of the "Semantic Web" are supposed to fit together in the overall picture... The relation between RDF/RDFS/RDFa? OWL? URIs? and finally, XML and SQL/SPARQL? All the descriptions I've read about so far about them make sense individually, but I'm not sure if I could be able to use them as tools if someone were to tell me to implement and query an ontology, for instance.

How to get all of the subjects of a Jena Query?

本秂侑毒 提交于 2019-12-06 23:55:34
问题 Suppose I have some jena query object : String query = "SELECT * WHERE{ ?s <some_uri> ?o ...etc. }"; Query q = QueryFactory.create(query, Syntax.syntaxARQ); What would be the best way to get all of the subjects of the triples in the query? Preferably without having to do any string parsing/manipulation manually. For example, given a query SELECT * WHERE { ?s ?p ?o; ?p2 ?o2. ?s2 ?p3 ?o3. ?s3 ?p4 ?o4. <http://example.com> ?p5 ?o5. } I would hope to have returned some list which looks like [?s,

[Freebase]: Finding relationship between nodes

◇◆丶佛笑我妖孽 提交于 2019-12-06 15:48:21
I am new to Freebase and I have been trying to find relationships between 2 nodes without success. For example, I want to find if there is link between Lewis Hamilton(/en/lewis_hamilton) and Formula One(/en/formula_one), which there is in real life, but I can't seem to find it. I have tried the following MQL codes, alternating IDs as well : 1) [{ "type" : "/type/link", "source" : { "id" : "/en/lewis_hamilton" }, "master_property" : null, "target" : { "id" : "/en/formula_one" }, "target_value" : null }] 2) { "id":"/en/lewis_hamilton", "/type/reflect/any_master":[{ "link":null, "name":null }], "

how to use cidoc-crm in jena

这一生的挚爱 提交于 2019-12-06 15:38:44
Recently, I'm trying to approach semantic web using Jena to create RDF and make query. Now, I have successfully made a owl based RDF file in Jena. However, when I trying to use different ontologies (such as: cidoc-crm), I do not know how to import those ontologies to Jena. Does anyone know how to import them to Jena? Do I need to create a new ontology model? Jena's OntModel interface provides a convenient way of working with ontologies (including RDFS ontologies). The following code shows how you can get an OntModel that contains the data of the ontology. In this code, I then create another

How to get data and object properties of an OWL class by using SPARQL? [duplicate]

这一生的挚爱 提交于 2019-12-06 11:24:32
问题 This question already has answers here : Get all properties for a DBpedia class (2 answers) Closed 5 years ago . I have a complex OWL ontology with many classes. What SPARQL query do I need to use to obtain data and object properties of one OWL class (e.g., Person class)? 回答1: In addition to Jukka Matilainen's answer, there are a few points that should be taken into consideration. OWL is not an object oriented programming language, and the concept of classes and properties are not the same as

Retrieving all paths in an OWL class hierarchy with SPARQL and Jena

丶灬走出姿态 提交于 2019-12-06 11:17:02
问题 I have an RDF graph of with a hierarchy three levels deep. I want to retrieve all the paths starting from the root of the class hierarchy (i.e., owl:Thing ) down to classes in the third level without using a reasoner. For instance, I would like the path C 1 &rightarrow; C 2 &rightarrow; C 3 is a path, where each C i is a class at the i th level of the hierarchy. I need to retrieve all the paths in the RDF graph using the breadth first search algorithm with no considerations to the object

Is there an API to get results similar to Google's “people also search for”?

半世苍凉 提交于 2019-12-06 10:53:01
问题 I'm looking for an API that would give similar results to the Google's "people also search for" feature. So that, for instance, when I search for Stanley Kubrik, I see all the other film directors that people search for. I know about the Freebase API but it simply provides information about the search item, not what other search items it may be related to. There is also a TargetingIdeaSelector tool in Google AdWords API that shows related keywords, but that doesn't really range the results