GithubHelp home page GithubHelp logo

swrlapi-example's Issues

POM file versioning

Hi, I noticed the dependency version is not indicated for owlapi and for the slf4j libraries on the POM file. Is there suppose to be a version indicated for these libraries?

Using SWRLAPI with generated Java code

Hi,

I am trying to use the SWRLAPI to run some rules/inferences in a dynamic application with Java.
I firstly designed my ontology, then, I exported the Java code using the Protégé code generation plugin. I made an application with the generated classes and they are ok, but when trying to use the SWRLEngine to perform the inferences (from the SWRL rules) it throws nothing important (compared to the results obtained in Protégé).
I am not sure if the generated Java code contains the SWRL rules embedded, or what can I do to use them in Java?

SWRLRuleEngine swrlEngine = SWRLAPIFactory.createSWRLRuleEngine(ontology);
swrlEngine.infer();
Set<OWLAxiom> inferredOWLAxioms = swrlEngine.getInferredOWLAxioms();
for(OWLAxiom axiom : inferredOWLAxioms)
    {
         System.out.println("Inferred axiom: " + axiom);
    }

--------------------------------------------------------------------------------------
Output: Inferred axiom: SameIndividual(<send-piece-material-data-service> )
Inferred axiom: SameIndividual(<request-piece-material-data-function> )
Inferred axiom: SameIndividual(<piece-data> )
Inferred axiom: SameIndividual(<semantic-application-interoperability> )
Inferred axiom: SameIndividual(<product-asset-b> )
Inferred axiom: SameIndividual(<application-complex-discrete-dynamics-model> )
Inferred axiom: SameIndividual(<s1_ba> )
Inferred axiom: SameIndividual(<process-c> )
Inferred axiom: SameIndividual(<resource-state-4> )
...

All the inferences are similar, not important information is given.

P.S:

  • I also noticed the swrlEngine.createSWRLRule(string, string1); command, but I have many rules and I would want to avoid declaring them again.
  • I have run the SWRL rules of my ontology in Protégé and it gives pretty interesting results, as the rule states. So, the rules are not the problem.

Any idea?

Many thanks in advance.

Santiago

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.