[Pellet-users] Restrict domain inference

Alejandro Rodríguez González jalo.javier at gmail.com
Tue Jan 29 18:33:54 UTC 2008


Hi Michael,


Michael Smith escribió:
> On Mon, 2008-01-28 at 22:07 +0100, Alejandro Rodríguez González wrote:
>
>   
>> I'm searching the causes of why my app is making inferecens too slow and 
>> i want to know if it's possible restrict the domain inference when i 
>> make a inference over a ontology.
>>     
>
> In general, Pellet avoids unnecessary work, but does all that is
> required to be sound and complete.  I.e., the behavior is not to compute
> all possible inferences.
>
>   
>> For example, i have some super classes (Disease, labtest, symptom, 
>> etc..) and i want that the reasoner inference the results only in a 
>> concrete superclass (diseases), discarding the rest (the objective is 
>> try to make reasoning faster).
>>     
>
> What distinguishes "concrete superclass[es]" from "the rest" in your
> context?
>
> What interface are you using to access Pellet?  This can affect the
> amount of reasoning performed.
>   
In my ontology ( http://www.jalojavier.es/humandisease.owl ) i have some 
classes "Diseases", "Symptoms", "LabTests", "Consult" (these are the 
most important), and others.

I discard the rest superclasses, because the classes that must be 
infered, instances and axioms of the classes are in Diseases subclasses 
only (not in the rest: Symptoms, LabTests, ...).

Now i'm using jena to access pellet, the code that i'm using is the next:

--------------

private void createModelToLoadData() {
    PelletOptions.USE_UNIQUE_NAME_ASSUMPTION = true; // I need this
    model = 
ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
    model.read(fileOnt.toURI().toString());
}


private void testInference() {
    Individual i1 = model.getIndividual(getOntologyURI() + 
"#PR_SYMS_A_B_C"); //PR_SYMS_A_B_C
    inferenceInstance(i1);
}

private void inferenceInstance(Individual i) {
    StmtIterator sti = model.listStatements(i, null, (RDFNode) null);
    int c = 1;
    for (; sti.hasNext(); ) {
        Statement stmt = (Statement)sti.next();
        Resource rx = stmt.getResource();
        System.out.println("Res [" + c + "]: " + rx);
        c++;
    }
}
------------

Thanks for your reply!


More information about the Pellet-users mailing list