ontology

Giving array as parameter to a Jena built-in

£可爱£侵袭症+ 提交于 2019-12-14 03:16:58
问题 I need to create a new built-in for Jena. With this one I would like to be able to extract the minimum date from where it is. I just wondering if it is possible to give a class of datas to a built-in instead of just one parameter. Here is the bodyCall of my function : @Override public boolean bodyCall(Node[] args, int length, RuleContext context) { System.out.println("Entra"); checkArgs(length, context); BindingEnvironment env = context.getEnv(); Node n1 = getArg(0, args, context); Node n2 =

Explanation about Direct Mapping to convert Many-to-Many relationship

僤鯓⒐⒋嵵緔 提交于 2019-12-13 19:01:45
问题 One of the standards from W3C for RDB2RDF is Direct Mapping. I heard that there is a problem when converting many-to-many relationship from a relational database and they say it loses semantic, I need more explanation about it. 回答1: ...there is a problem when converting many-to-many relationship from a relational database I'd say that direct mapping introduces additional "parasitic" semantics, treating normalization artefacts as first-class object. Let's consider the D011-M2MRelations

How can I programmatically compute path length using Jena RDF/Ontology API?

别等时光非礼了梦想. 提交于 2019-12-13 15:53:50
问题 I have an RDF Graph with only one relationship(RDFS.subClassOf or is-a) between all the classes. The 'size' of each class is equal to the total number of its subclasses. The 'size' of each RDFS.subClassOf property is 0.5 if it is connecting from a class with fewer total number of subclasses and 1 if it is connecting from class with large total number of subclasses to class with less total number of subclasses. I want to perform an arithmetic sum of all the sizes of each semantic component

How to improve the performance when working with wikipedia data and huge no. of webpages?

拟墨画扇 提交于 2019-12-13 12:50:21
问题 I am supposed to extract representative terms from an organisation's website using wikipedia's article-link data dump. To achieve this I've - Crawled & downloaded organisation's webpages. (~110,000) Created a dictionary of wikipedia ID and terms/title. (~40million records) Now, I'm supposed to process each of the webpages using the dictionary to recognise terms and track their term IDs & frequencies. For the dictionary to fit in memory, I've splitted the dictionary into smaller files. Based

Get data from rdf file [duplicate]

a 夏天 提交于 2019-12-13 08:57:21
问题 This question already has an answer here : Closed 6 years ago . Possible Duplicate: Java - Using Jena APi - Get data from RDF file I'm using Java and Jena API. I have the class Person with the datatype properties hasFirstName , hasLastName , hasDateOfBirth , hasGender . Here is how one person is represented in my RDF file. <rdf:Description rdf:about="http://www.fam.com/FAM#Bruno04/02/1980 "> <j.0:FAMhasGender>H</j.0:FAMhasGender> <j.0:FAMhasDateOfBirth>04/02/1980</j.0:FAMhasDateOfBirth> <j.0

How to get the movies which are based on english novels using SPARQL in DBPEDIA

a 夏天 提交于 2019-12-13 08:14:56
问题 Using SPARQL, I am trying the get the list of all english novels and their properties. I would also like to find if a movie was taken based on that novel and get the movie name and its director, If a movie relationship exists. Code: SELECT ?movie ?director ?book ?author ?publisher ?illustrator WHERE { ?movie dcterms:subject <http://dbpedia.org/resource/Category:films> ; dbpedia-owl:basedOn ?book . ?movie dbp:director ?director . ?book a dbpedia-owl:Book . ?book dbp:author ?author . ?book dbp

Pellet Reasoner with Jena

蹲街弑〆低调 提交于 2019-12-13 05:48:13
问题 I am running Pellet with Jena as the following: public void storeInferredModel(Data data) { System.out.println("creating inferred dataset "); Dataset dataset = TDBFactory.createDataset(data.getInferredResultsPath()); System.out.println("creating OntModel "); OntModel Infmodel = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, dataset.getNamedModel(this.URL)); System.out.println("adding schema (OWL) to OntModel"); Infmodel.add(this.owl); System.out.println("adding data (RDF)

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

Converting UML to OWL Ontology

為{幸葍}努か 提交于 2019-12-13 03:05:28
问题 I am trying to develop an OWL ontology based on different UML file resources presented in xmi format. Reading through the internet for a while now, it seems that almost all the available tools or approaches are outdated and even when trying some of them they don't provide the expected outcome. Since this ontology plays a really important role in our project, i wanted to know what is the best approach/tools to be used in order to convert UML to OWL ? 回答1: I have looked into this myself as well

no inferences with DL queries in OWL - API

浪子不回头ぞ 提交于 2019-12-13 02:57:34
问题 I am trying to write a query Hospitals and hasNameWithWords value "center"^^string This query returns me the instances that has the hospitals that has "center" in its name in Protege 4.2 with FACT++ reasoner as well as Hermit reasoner but when i input the same query in the OWL-API's DL Query Example thats available in the website http://sourceforge.net/p/owlapi/code/ci/aef6981535f07a2d0d44c394b9f4d5415f36025a/tree/contract/src/test/java/org/coode/owlapi/examples/DLQueryExample.java I don't