semantic-web

How to recursively expand blank nodes in SPARQL construct query?

戏子无情 提交于 2019-12-04 01:16:52
There is probably an easy to answer to this, but I can't even figure out how to formulate the Google query to find it. I'm writing SPARQL construct queries against a dataset that includes blank nodes. So if I do a query like CONSTRUCT {?x ?y ?z .} WHERE {?x ?y ?z .} Then one of my results might be: nm:John nm:owns _:Node Which is a problem if all of the _:Node nm:has nm:Hats triples don't also get into the query result somehow (because some parsers I'm using like rdflib for Python really don't like dangling bnodes). Is there a way to write my original CONSTRUCT query to recursively add all

Extract relevant sentences to entity

為{幸葍}努か 提交于 2019-12-03 21:54:00
Do you know some paper or algorithm in NLP that is able to extract sentences from text that are related to given entity (term). I would like to process some reviews (mainly tech), but I found out that many reviews mention more then one product (they do comparation). I would like to extract from that text just sentences that are relevant to one product, or delete sentences that are irrelevant to particular named entity (product). My questin is how to do it? Is there some related papers? Is something like this done by some toolkit or api? What you want is a Named Entity Recognizer (NER). Given

Why use owl:Restriction as own:EquivalenceClass's property?

浪子不回头ぞ 提交于 2019-12-03 16:50:03
I just start to learn Semantic Web and have a question about restriction class. I dug a while but haven't found any answer yet.. Any help would be much appreciated! From text book, I see examples of define restriction class, they are all about to define a anonymous owl:Restriction class bnode and link this bnode with property owl:equivalentClass . example: example:restrictionClass owl:equivalentClass [ rdf:type owl:Restriction; owl:onProperty example:resProp; owl:someValuesFrom example:resValue. ] My question is can we define a restriction class directly? Like: example:restrictionClass rdf

owl - protege not inferring correctly? how to define precisely a class “vegetarian”?

拈花ヽ惹草 提交于 2019-12-03 16:06:44
I have been stuck for two days now trying to understand why the following scenario isn't working: screenshots here: http://dl.dropbox.com/u/4677548/screenshots.html I have a VegetarianFood class (subclass of Food) that is equivalent to "Food and (Eggs or MilkAndDerivates or VeganFood)" as you can see in the screenshot number 1 The VeganFood class, on turn, is equivalent to other classes (NutsAndSeeds, Cereals, Fruit, etc...) screenshot 2 as you can see there are two individuals (cheddar cheese and cashew) created as MilkAndDerivates and NutsAndSeeds screenshot 3 and they are correctly inferred

How to relate each instance of class with each instance of another class?

戏子无情 提交于 2019-12-03 14:15:13
问题 The general problem I'm working on a simple ontology, using Protégé 4.3 and trying to create a model such that every instance of a class C has some particular value v , which is an instance of a class V , for a given property p . I can get this inference using an axiom C subClassOf (p value v) but I think I want to be able to state this more along the lines of a C subClassOf (p some V) because I'd actually like each instance of C to be related to every instance of V . A specific example My

Semantic Web Framework

时间秒杀一切 提交于 2019-12-03 12:11:08
问题 What semantic web frameworks are there, and what are the advantages / disadvantages of each? I've made extensive use of Jena, and I have looked at Sesame briefly. Are there others I should consider as well? 回答1: a more low-level appproach is redland, which provides bindings to a lot of languages like Perl, PHP, Python and Ruby. redland itself is written in C. i have scripted with it in ruby to provide a simple webservice with a rdf backend instead of a classic database. 回答2: Redland is a good

Python tools/libraries for Semantic Web: state of the art? [closed]

喜夏-厌秋 提交于 2019-12-03 09:16:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . What are the best (more or less mature, supporting more advanced logic, having acceptable performance, scalable to some extent) open source Semantic Web libraries and tools (RDF storage, reasoning, rules, queries) for Python nowadays? Historically Python tools (cwm) were among the first to appear, but it still

How to tag a photo to be used as a thumbnail when a page is linked to on Facebook

╄→尐↘猪︶ㄣ 提交于 2019-12-03 08:00:48
问题 When a person posts a link on Facebook, Facebook automatically finds a photo to be used as a thumbnail that shows up in the news feed. Is there some sort of (HTML) markup to surround a photo you'd like to use as the first choice? 回答1: What you want are the <meta> tags that Facebook defines in their documentation on Facebook_Share/Specifying_Meta_Tags. You don't put the metadata around the image itself, rather, you put it in the head of the document, like this: <meta name="title" content="The

Querying DBpedia with SPARQL and Jena

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 05:17:36
问题 I cannot understand how can I query DBpedia using Jena. In the tutorials like here(Listing 4) model is initialized as follows: // Open the bloggers RDF graph from the filesystem InputStream in = new FileInputStream(new File("bloggers.rdf")); // Create an empty in-memory model and populate it from the graph Model model = ModelFactory.createMemModelMaker().createModel(); model.read(in,null); // null base URI, since model URIs are absolute in.close(); Let's say I want to write a query that will

What is the relationship between RDF, RDFa, Microformats and Microdata

巧了我就是萌 提交于 2019-12-03 04:52:33
问题 I've done quite a bit of research but I can't understand the exact relationship between the 3. Also, now that W3C has officially recognised RDFa, would you recommend it over Microdata, taking into consideration that it matches Microdata's features and more? 回答1: <sarcasm>I can't imagine what you find so confusing</sarcasm> (edit: these tags were invisible before) Very briefly: Microformats A way to use html pages as both a human readable document and machine readable data , without repetition