简体   繁体   中英

How to work with SWRL in C# using OwlDotNetApi or other libraries

I need to import an OWL file that includes SWRL rules from Protégé and edit it in my own program which is written in C#. I used the OwlDotNetApi to import the file from Protégé, which worked fine. How can I work with the imported data? I have seen special classes for OWL classes and so on but nothing for SWRL. Is there any support for SWRL, or do I need to use another API? Is there a matching API at all?

With dotNetRdf you can use rules with N3 syntax to reason :

{ ?x a ex:Car } => { ?x a ex:Vehicle }

So, as suggested by Joshua Taylor , you could first serialize your SWRL rules to N3 syntax and then use the reasoner.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM