reasonning swrl

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

reasonning swrl

bilel
Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

Martin O'Connor-2
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

bilel
Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

Martin O'Connor-2

All SWRLAPI library components are on Maven central so they do not need to be manually downloaded.

The example project will give you a template for creating your own project.

You can import the example project references into Eclipse via its Maven import mechanism (see [1], for example) and go from there.

I would spend some time reading the wiki documentation before you begin.

Martin

[1] https://stackoverflow.com/questions/2061094/importing-maven-project-into-eclipse

On Jun 11, 2019, at 5:30 PM, Bilel Abderrahman <[hidden email]> wrote:

Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

bilel
ok thank you 
please to load my ontology 
with pellet i used
String ont = "http://purl.obolibrary.org/obo/cvdo.owl";
String fileOnto = "cvdoinput.owl";

OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );
InputStream   in1 = new FileInputStream(new File( fileOnto));
model.read( in1, null );



and here???
  if (args.length > 1)
      Usage();

    Optional<String> owlFilename = args.length == 0 ? Optional.<String>empty() : Optional.of(args[0]);
    Optional<File> owlFile = (owlFilename != null && owlFilename.isPresent()) ?
      Optional.of(new File(owlFilename.get())) :
      Optional.<File>empty();
this is in swrlexample

Le mer. 12 juin 2019 à 19:01, Martin O'Connor <[hidden email]> a écrit :

All SWRLAPI library components are on Maven central so they do not need to be manually downloaded.

The example project will give you a template for creating your own project.

You can import the example project references into Eclipse via its Maven import mechanism (see [1], for example) and go from there.

I would spend some time reading the wiki documentation before you begin.

Martin

[1] https://stackoverflow.com/questions/2061094/importing-maven-project-into-eclipse

On Jun 11, 2019, at 5:30 PM, Bilel Abderrahman <[hidden email]> wrote:

Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

bilel
error 
i have this error 
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.247 s
[INFO] Finished at: 2019-06-12T04:55:05+01:00
[INFO] Final Memory: 6M/116M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

Le mer. 12 juin 2019 à 03:40, Bilel Abderrahman <[hidden email]> a écrit :
ok thank you 
please to load my ontology 
with pellet i used
String ont = "http://purl.obolibrary.org/obo/cvdo.owl";
String fileOnto = "cvdoinput.owl";

OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );
InputStream   in1 = new FileInputStream(new File( fileOnto));
model.read( in1, null );



and here???
  if (args.length > 1)
      Usage();

    Optional<String> owlFilename = args.length == 0 ? Optional.<String>empty() : Optional.of(args[0]);
    Optional<File> owlFile = (owlFilename != null && owlFilename.isPresent()) ?
      Optional.of(new File(owlFilename.get())) :
      Optional.<File>empty();
this is in swrlexample

Le mer. 12 juin 2019 à 19:01, Martin O'Connor <[hidden email]> a écrit :

All SWRLAPI library components are on Maven central so they do not need to be manually downloaded.

The example project will give you a template for creating your own project.

You can import the example project references into Eclipse via its Maven import mechanism (see [1], for example) and go from there.

I would spend some time reading the wiki documentation before you begin.

Martin

[1] https://stackoverflow.com/questions/2061094/importing-maven-project-into-eclipse

On Jun 11, 2019, at 5:30 PM, Bilel Abderrahman <[hidden email]> wrote:

Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

Martin O'Connor-2

The reason in linked to in the error:


You need to tell Maven what you want it to do, e.g., compile the code, run tests

Martin


On Jun 11, 2019, at 7:58 PM, Bilel Abderrahman <[hidden email]> wrote:

error 
i have this error 
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.247 s
[INFO] Finished at: 2019-06-12T04:55:05+01:00
[INFO] Final Memory: 6M/116M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

Le mer. 12 juin 2019 à 03:40, Bilel Abderrahman <[hidden email]> a écrit :
ok thank you 
please to load my ontology 
with pellet i used
String ont = "http://purl.obolibrary.org/obo/cvdo.owl";
String fileOnto = "cvdoinput.owl";

OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );
InputStream   in1 = new FileInputStream(new File( fileOnto));
model.read( in1, null );



and here???
  if (args.length > 1)
      Usage();

    Optional<String> owlFilename = args.length == 0 ? Optional.<String>empty() : Optional.of(args[0]);
    Optional<File> owlFile = (owlFilename != null && owlFilename.isPresent()) ?
      Optional.of(new File(owlFilename.get())) :
      Optional.<File>empty();
this is in swrlexample

Le mer. 12 juin 2019 à 19:01, Martin O'Connor <[hidden email]> a écrit :

All SWRLAPI library components are on Maven central so they do not need to be manually downloaded.

The example project will give you a template for creating your own project.

You can import the example project references into Eclipse via its Maven import mechanism (see [1], for example) and go from there.

I would spend some time reading the wiki documentation before you begin.

Martin

[1] https://stackoverflow.com/questions/2061094/importing-maven-project-into-eclipse

On Jun 11, 2019, at 5:30 PM, Bilel Abderrahman <[hidden email]> wrote:

Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

Martin O'Connor-2
In reply to this post by bilel
I don’t understand the question.

Martin

[1] http://ceur-ws.org/Vol-849/paper_31.pdf

On Jun 11, 2019, at 6:40 PM, Bilel Abderrahman <[hidden email]> wrote:

ok thank you 
please to load my ontology 
with pellet i used
String ont = "http://purl.obolibrary.org/obo/cvdo.owl";
String fileOnto = "cvdoinput.owl";

OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );
InputStream   in1 = new FileInputStream(new File( fileOnto));
model.read( in1, null );



and here???
  if (args.length > 1)
      Usage();

    Optional<String> owlFilename = args.length == 0 ? Optional.<String>empty() : Optional.of(args[0]);
    Optional<File> owlFile = (owlFilename != null && owlFilename.isPresent()) ?
      Optional.of(new File(owlFilename.get())) :
      Optional.<File>empty();
this is in swrlexample

Le mer. 12 juin 2019 à 19:01, Martin O'Connor <[hidden email]> a écrit :

All SWRLAPI library components are on Maven central so they do not need to be manually downloaded.

The example project will give you a template for creating your own project.

You can import the example project references into Eclipse via its Maven import mechanism (see [1], for example) and go from there.

I would spend some time reading the wiki documentation before you begin.

Martin

[1] https://stackoverflow.com/questions/2061094/importing-maven-project-into-eclipse

On Jun 11, 2019, at 5:30 PM, Bilel Abderrahman <[hidden email]> wrote:

Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: reasonning swrl

Michael DeBellis-2
In reply to this post by bilel
Bilel, I'm probably telling you something you already know but since you said you are a beginner I just wanted to make sure you understood one basic thing about SWRL. That is that you don't have to bother with Eclipse or Java libraries if all you want to do is to run SWRL rules. SWRL rules can be executed on OWL objects simply from within Protege. You need to use the Pellet reasoner because the other reasoners don't currently support all the SWRL built-ins but if you use Pellet then you don't have to do anything extra to get your SWRL rules to run in Protege. Just run the Pellet reasoner and just as it will infer things from the DL axioms you define for your classes and properties it will also run all your SWRL rules that you define in the SWRL Tab. If you have rules defined that you think should be executing but they aren't executing when you run the reasoner you can use SQWRL to help debug your rules. Here is a short tutorial I wrote for SWRL that gives examples:   https://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html  

I'm guessing you know that and what you are trying to do is to use SWRL with Apache Jenna or some other OWL Java framework (in which case you DO need to bother with things like Eclipse and Maven and I can't help and you need the insight from the true gurus like Martin) but I thought it was worth mentioning just to make sure. 

Michael


On Wed, Jun 12, 2019 at 9:53 AM Bilel Abderrahman <[hidden email]> wrote:
Thanks Martin
i use eclipse .
should i download swrlapi then use the example? 
i shouls load my ontology then run my rules and infer it.
i am beginner.
i need your help

Le mer. 12 juin 2019 à 18:43, Martin O'Connor <[hidden email]> a écrit :
See:


and:


Martin



On Jun 11, 2019, at 5:17 PM, Bilel Abderrahman <[hidden email]> wrote:

Hi please i need your help
i have an ontology .owl with swrl in Protege
i need a code java to execute and run (infer) rules 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user