ontology

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

旧巷老猫 提交于 2019-12-10 11:32:47
问题 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? 回答1: Making hasType functional is the right move since every Vehicle can

How do you find the list of wikidata (or freebase or DBpedia) topics that a text is about?

你说的曾经没有我的故事 提交于 2019-12-10 10:44:37
问题 I am looking for a solution to extract the list of concepts that a text (or html) document is about. I'd like the concepts to be wikidata topics (or freebase or DBpedia). For example " Bad is a song by Mikael Jackson " should return Michael Jackson (the artist, wikidata Q2831) and Bad (the song, wikidata Q275422). As this example shows, the system should be robust to spelling mistakes (Mikael) and ambiguity (Bad). Ideally the system should work across multiple languages, it should work both

Jena PrefixMapping: base namespace missing when model is a named model obtained from a dataset

故事扮演 提交于 2019-12-10 10:36:11
问题 This the code I am using to load OntModel to a Dataset as a Named Model. Then I try to retrieve the PrefixMapping for the same in two different ways: public static void loadDatasetwithNamedModels(){ OntModel namedModel = null; Dataset dataset = null; dataset = TDBFactory.createDataset("./path/to/TDB_DIR"); namedModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); dataset.begin(ReadWrite.WRITE); try{ namedModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); FileManager

ontology with java(jena)

↘锁芯ラ 提交于 2019-12-10 10:32:33
问题 I'm doing some project which is based on ontology.I want to identify semantic of the text that has entered by user. Is there any possible way to fulfill my task dealing with ontology through jena? 回答1: Jena doesn't do Natural Language Processing. You want to look at APIs like Zemanta or OpenCalais, or tools like GATE. 回答2: You might be looking for something like this: http://nlp2rdf.org The other answers are still correct: Jena is not NLP. But with NLP2RDF you can query NLP tool output with

Can a class in one context be considered an instance in another?

空扰寡人 提交于 2019-12-09 23:31:36
问题 In a knowledge representation system like RDF, which is based on creating ontological hierarchies, can a class in one context be considered an instance in another? Take the example of a triplestore which contains a library catalogue. It may contain statements such as: :Book a rdfs:Class :gullivers_travels a :Book :moby_dick a :Book This makes sense, but in another context, you may want to itemize the various editions of Moby Dick , and so it may also make sense to treat it as a class, e.g.:

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

狂风中的少年 提交于 2019-12-09 13:19:23
问题 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

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

跟風遠走 提交于 2019-12-09 13:11:15
问题 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

SWRL tab in Protege 4

元气小坏坏 提交于 2019-12-09 04:18:39
问题 The protege SWRL tab is not available in Protege 4 versions, I have tried both protege 4.1 and protege 4.2. The axiome plugin mentioned to edit the SWRL rules in protege has been said to work only in protege 3 versions. Can anyone tell me plugins or procedure to include the plugin to edit SWRL rules in protege? 回答1: SWRL rules can be edited in Protégé 4, but not with a nice interface like in Protégé 3. If you go to menu Window -> Views -> Ontology views, there is an option Rules. Select it

Stand alone Application for Retrieving data from 8 ontology files(.ttl files) and displaying the output in json

微笑、不失礼 提交于 2019-12-08 13:31:26
问题 I am new to semantic web. I spent lot of time in understanding the concepts of semantic web i.e. RDF,ontology,ontology mapping etc. Now I have a task to retrieve the data from 8 ontology files and display the output in json format. I will explain the problem in detail. I was given 8 ontology files(.ttl files) which represents the information of the persons in an organisation. Now the out put must include the information regarding all the persons in the company with their personal information

SPARQL filter regex and union

倾然丶 夕夏残阳落幕 提交于 2019-12-08 12:35:33
问题 My ontology has 2 classes: food foodSource . I want to get the data for the class food with 2 kinds of foodSource using the SPARQL query: SELECT ?food ?foodSource ?foodSource2 WHERE { { ?foodSource mpasi:data_memerlukanBahan ?memerlukanBahan. ?food ?memerlukanBahan ?value. FILTER regex(str(?foodSource),"carrot") } UNION { ?foodSource2 mpasi:data_memerlukanBahan ?memerlukanBahan. ?food ?memerlukanBahan ?value. FILTER regex(str(?foodSource2),"tomato") } } order by ?food I get the correct result