semantic-web

OWL how to force all the instances of a specific class to have a specific relationship

不问归期 提交于 2019-12-06 08:55:26
I am building an Ontology. I have a Class called Vehicle I have an Object Property called hasType I have a Class called VehicleTypes How can I force all the instances from Vehicle class to have one and just one instance of VehicleTypes What I have tried I am working on Protege. I made the hasType as a functional property. I added an Equivalent To which is like this: hasType exactly 1 VehicleTypes Is that enough please? Making hasType functional is the right move since every Vehicle can only have one VehicleType . However, you need to describe Vehicle hasType exactly 1 VehicleType as a

Using SWRL with Jena and Pellet

寵の児 提交于 2019-12-06 08:35:07
问题 I was unable to find some decent simple code examples of using SWRL and Jena with Pellet, or at least using SWRL? I have studied some examples in Pellet documentation, but there is no example about using SWRL. Most examples on the web are incomplete and confusing. The only solution I found was with the Jess Rule Engine but it is not free and is under commercial license. I found that Pellet support SWRL rules but could not find running example. The only example I found is this, but I do not

How save the result of reasoner FaCT++ or HermiT in Protege

穿精又带淫゛_ 提交于 2019-12-06 06:40:20
I'm using Protégé 4.3 and I want to save the results of the reasoner to the ontology file. When I stopped the reasoner, all results disappeared. How can I save results? Ignazio In Protégé, use File → Export inferred axioms as ontology… That should do what you're looking for. 来源: https://stackoverflow.com/questions/23079459/how-save-the-result-of-reasoner-fact-or-hermit-in-protege

MarkLogic - CORS with REST API

蹲街弑〆低调 提交于 2019-12-06 06:20:35
I have a MarkLogic-based web application which pulls data from two sources, a document store and a triple store both hosted on my MarkLogic server. The app uses MarkLogic's built-in REST APIs to access these data stores. The document store's REST API is running on port 8003 and the triple store's REST API is on port 8007. The application is hosted on the modules database of the document store. Now, when I make a REST API call to pull triple data, I get an exception saying the 'access-control-allow-origin' header has not been set at the server side. I would like to know how I can set it up so I

converting freebase MQL to SPARQL

落花浮王杯 提交于 2019-12-06 05:15:03
问题 following freebase MQL finds 5 artists and 50 albums for each artists. [{ "type" : "/music/artist", "name":null, "album" : [{ "name" : null, "count":null, "limit":50 }], "limit":5 }] first try - without a subquery I can write SPARQL like this: SELECT ?artist ?album WHERE { ?artist :type :/music/artist . ?artist :album ?album } LIMIT n but, I don't know how many n should be specified because SPARQL has no hierarchy as far as I know. second try - with a sub-query (not sure this works correctly)

How to create a basic semantic search in python

喜夏-厌秋 提交于 2019-12-06 03:06:01
问题 I want to write a basic semantic web crawler using Python, I know that semantic apps use RDF files, but what else? I have some Python RDF modules installed and I started learning how they work. Could you introduce me to the technologies and techniques used in a semantic application? 回答1: The next things you might want to learn are: embedding samantic data in HTML - RDFa, microformats, microdata. Some stats: microformats and RDFa deployment across the Web via DAM.co.uk: querying RDF data -

How to import dbpedia into neo4j? [closed]

荒凉一梦 提交于 2019-12-06 00:35:00
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 4 months ago . I need to import dbpedia into neo4j. I download the dbpedia from here: http://wiki.dbpedia.org/Downloads37 Any idea? I am currently doing the same thing. I found that the biggest problem for this is the indexing so the best solution is to write a java program that extracts the statements with md5 hashes into a triple file like follows: subjectHash \t predicateHash \t objectHash

Auto Categorization of Content

心不动则不痛 提交于 2019-12-05 23:56:01
I'm developing a script that extracts the messages from the message archive of a particular meetup.com group of which I'm a member - http://www.meetup.com/opencoffee/messages/archive/ The idea is to dynamically add these to a wordpress site and allow people to search messages, auto tag messages etc. The issue I have is how best to auto categorize these messages. I would welcome any thoughts and ideas of how best to go about this and what would be the most efficient way of programming this. Option 1 Find a source of tags by subject area such as finance, technology, business etc by using the

Optimization of SPARQL query. [ Estimated execution time exceeds the limit of 1500 (sec) ]

两盒软妹~` 提交于 2019-12-05 22:49:34
I am trying to run this query on http://dbpedia.org/sparql but I get an error that my query is too expensive. When I run the query trough http://dbpedia.org/snorql/ I get: The estimated execution time 25012730 (sec) exceeds the limit of 1500 (sec) ... When running the query through my python script using SPARQLWrapper I simply get an HTTP 500. I figure I need to do something to optimize my SPARQL query. I need the data for iterating over educational institutions and importing it in to a local database, maybe I am using SPARQL wrong and should do this in a fundamentally different way. Hope

Schema.org usage of WPHeader (or how to add structured data to ‘Hero’ images

一世执手 提交于 2019-12-05 21:22:26
This question is related to this question: Uniform way to add multiple descriptive properties in Schema.org Recently I found this code on HTML5 & Schema.org - Structured Microdata for SEO , along with the statement that the Schema.org WPHeader type is a WebPageElement that can include markup from CreativeWork as well as Thing : <header role="banner" itemscope itemtype="http://schema.org/WPHeader"> <meta itemprop="name" content="A name"> <meta itemprop="description" content="A description text"> <h1 itemprop="headline">A headline text</h1> <img itemprop="image" src="image.jpg"> </header> If the