I've created this application for my university project. This basically convert OWl/RDF file to AIML. We've told to create a simple ontology regarding the Cornavirus and using that ontology, create a simple chatbot. Following screenshot shows my ontology.
For this I've used Protege. Additionally to mine the ontology, I've used Twinkle as the software to execute SPARQL queries.
After generating the RDF/OWL file from Protege, for converting that to AIML I've created a small java program using swrlapi. This is how my SQWRL looks like.
queryEngine.runSQWRLQuery("Q1", "Treatments(?p) ^ available_for(?p, ?c) ^ name(?p, ?g)-> sqwrl:select(?g)");
After that using a custom parser I've generated a simple AIML file. (It may require some modifications after generating) . Add below AIML tag to the file
<aiml version="2.0"><aiml>
For the chatbot I've used online platform called Pandorabots. Below diagram shows the simple architecture of my little system.
The final outcome of the chatbot would be as follows after importing the AIML to pandora.