Mini-ME - the Mini Matchmaking Engine

Sisinf Lab logo

Reasoner description

Due to architectural and performance reasons, it is currently unfeasible or impractical to use available Semantic Web reasoners in the Semantic Web of Things. Therefore we are developing a prototypical mobile reasoner for the SWoT. It supports standard Semantic Web technologies through the OWL API and implements both standard reasoning tasks for knowledge base (KB) management (subsumption, classification, satisfiability) and non-standard inference services for semantic-based matchmaking and resource ranking (abduction, contraction and covering). Mini-ME is developed in Java, adopting Android as the current target computing platform, but running also on Java SE.

Download Mini-ME

The current Mini-ME beta version is distributed for the only purpose of academic review and evaluation. Any other use is not allowed.
You can download the last (beta) version of Mini-ME from the following link: minime-beta-2.0.0.jar

You can try Mini-ME using the reference source code and ontology dataset (see Download section).

Usage: Download the most recent version of Mini-ME from download section. Add minime-beta-2.0.0.jar file in the directory lib to your Java class path. You will also need the OWL API 3.2.4 or more recent, which can be downloaded from here, and the Colt 1.2.0 API, available here.

Using Mini-ME as OWLlink Server

To run Mini-ME as OWLlink server download the minime-owllink.zip package and run the start-minime script (start-minime.bat for Windows users or start-minime.sh for Linux users) stored into the folder "minime-server".

The OWLlink server component will start at localhost:8080 by default. To change the listening port you can modify the value of -port argument of the java command within the script.

Using Mini-ME (2.0.0) with the OWL API 3.0

Load and classify an ontology - Shows how to interact with the Mini-ME reasoner
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLDataFactory owlDataFactory = OWLManager.getOWLDataFactory();
File onto_path = new File(ONTO_DIR);
//Load ontology from an input file
OWLOntology onto = manager.loadOntologyFromOntologyDocument(onto_path); 
//Create the factory
MicroReasonerFactory reasonerFactory = new MicroReasonerFactory();
//Return an instance of OWLReasoner class that represents our Mini-ME reasoner
reasoner = reasonerFactory.createMicroReasoner(onto);
                    


Class Satisfiability - Shows how to check the satisfiability of a class
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLDataFactory owlDataFactory = OWLManager.getOWLDataFactory();
File onto_path = new File(ONTO_DIR);
//Load ontology from an input file
OWLOntology onto = manager.loadOntologyFromOntologyDocument(onto_path); 
//An instance of the class of which to verify the satisfiability
OWLClass class2check = owlDataFactory.getOWLClass(IRI.create(CLASS_IRI));
//Create the factory
MicroReasonerFactory reasonerFactory = new MicroReasonerFactory();
//Return an instance of OWLReasoner class that represents our Mini-ME reasoner
reasoner = reasonerFactory.createMicroReasoner(onto);
//The returned value is a boolean
boolean result = reasoner.isSatisfiable(class2check);
if(result){
        System.out.println("The class "+CLASS_IRI+" is satisfiable.");
}else {
        System.out.println("The class "+CLASS_IRI+" is not satisfiable.");
}
                    


Ontology Consistency - Shows how to check the satisfiability of an ontology
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
File onto_path = new File(ONTO_DIR);
//Load ontology from an input file
OWLOntology onto = manager.loadOntologyFromOntologyDocument(onto_path); 
//Create the factory
MicroReasonerFactory reasonerFactory = new MicroReasonerFactory();
//Return an instance of OWLReasoner class that represents our Mini-ME reasoner
reasoner = reasonerFactory.createMicroReasoner(onto);
//The returned value is a boolean
boolean result = reasoner.isConsistent();
if(result){
        System.out.println("The TBox of the ontology is consistent.");
}else {
        System.out.println("The TBox of the ontology is not consistent.");
}
                    

Using Mini-ME for non-standard inference services

Concept Abduction and Contraction - Shows how to use Abduction and Contraction non-standard inference services
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
File file = new File(ONTO_DIR);
File request = new File(REQUEST_DIR);

try{
        onto = manager.loadOntologyFromOntologyDocument(file);
        //Create the factory
        MicroReasonerFactory reasonerFactory = new MicroReasonerFactory();
        //Return an instance of OWLReasoner class that represents our Mini-ME reasoner
        reasoner = reasonerFactory.createMicroReasoner(onto);
        onto_request = manager.loadOntologyFromOntologyDocument(request);
        Set<String> requests_name = reasoner.loadRequest(onto_request);		
        String requestInd = null;
        Iterator<String> iter_requests = requests_name.iterator();
        while(iter_requests.hasNext()){
                requestInd = (String) iter_requests.next();
        }

        Set<String> list = reasoner.getSupplyIndividuals(); 
        Iterator<String> iter = list.iterator();
        while(iter.hasNext()){
            String resourceInd = (String) iter.next();
            if(reasoner.checkCompatibility(resourceInd, requestInd) == true){
                    IRI resourceIRI = IRI.create(resourceInd);
                    IRI requestIRI = IRI.create(requestInd);
                    System.out.println("Compute abduction between "+resourceIRI.getFragment()+" e "+requestIRI.getFragment());
                    Abduction h = reasoner.abduction(resourceInd, requestInd); 
                    System.out.println("H: "+h.H.toString());
            }else {
                    IRI resourceIRI = IRI.create(resourceInd);
                    IRI requestIRI = IRI.create(requestInd);
                    System.out.println("Compute contraction between "+resourceIRI.getFragment()+" e "+requestIRI.getFragment());
                    Contraction result = reasoner.contraction(resourceInd, requestInd); 
                    System.out.println("Keep: "+result.K.toString());
                    System.out.println("Give-up: "+result.G.toString());
            }        	
        }

}catch(Exception e){
        e.printStackTrace();
}
                    


Concept Covering - Shows how to use Concept Covering non-standard inference service
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
File file = new File(ONTO_DIR);
File request = new File(REQUEST_DIR);

try{
        onto = manager.loadOntologyFromOntologyDocument(file);
        //Create the factory
        MicroReasonerFactory reasonerFactory = new MicroReasonerFactory();
        //Return an instance of OWLReasoner class that represents our Mini-ME reasoner
        reasoner = reasonerFactory.createMicroReasoner(onto);
        onto_request = manager.loadOntologyFromOntologyDocument(request);
        Set<String> requests_name = reasoner.loadRequest(onto_request);		
        String requestInd = null;
        Iterator<String> iter_requests = requests_name.iterator();
        while(iter_requests.hasNext()){
                requestInd = (String) iter_requests.next();
        }

        System.out.println("Compute covering...");
        Composition result = reasoner.composition(requestInd); 
        System.out.print("Set: ");
        Vector<Item> set = (Vector<Item>)result.Rc;
        for(int i=0; i<set.size(); i++){
                System.out.print(((Item)set.get(i)).name+", ");
        }
        System.out.println("");
        System.out.println("Uncovered-part: "+((Item)result.Du).description.toString());

}catch(Exception e){
        e.printStackTrace();
}

Project coordinators


Valid XHTML 1.1   Valid CSS

:: hosted by SisInf Lab http://sisinflab.poliba.it ::