Package com.clarkparsia.pellet.owlapiv3

Examples of com.clarkparsia.pellet.owlapiv3.EntailmentQueryVisitor


          .create( premiseURI ) );
      manager = org.semanticweb.owlapi.apibinding.OWLManager.createOWLOntologyManager();
      org.semanticweb.owlapi.model.OWLOntology conclusion = manager.loadOntology( IRI
          .create( conclusionURI ) );

      PelletReasoner reasoner = new com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory()
          .createReasoner( premise );
      assertTrue( reasoner.isEntailed( conclusion.getAxioms() ) );
    } catch( org.semanticweb.owlapi.model.OWLOntologyCreationException e ) {
      throw new RuntimeException( e );
    }

  }
View Full Code Here


    axioms.addAll( familyRef.getAxioms() );
    axioms.addAll( familyRules.getAxioms() );
   
    OWLOntology mergedOntology = OWL.Ontology( axioms );
   
    PelletReasoner reasoner = com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.getInstance().createReasoner( mergedOntology );

    OWLIndividual nella = OWL.Individual( luigiFamily.resolve( "#Nella" ) );
    OWLObjectProperty hasUncle = OWL.ObjectProperty( luigiFamily.resolve( "#hasUncle" ) );
    OWLIndividual dino = OWL.Individual( luigiFamily.resolve( "#Dino" ) );

    assertFalse( reasoner.isEntailed( OWL.propertyAssertion( nella, hasUncle, dino ) ) );

  }
View Full Code Here

      // E(a)
      OWL.classAssertion( individualA, classE ) };

    OWLOntology ontology = OWL.Ontology( axioms );

    PelletReasoner reasoner = com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory
        .getInstance().createNonBufferingReasoner( ontology );

    assertTrue( reasoner.isConsistent() );
    assertTrue( reasoner.isEntailed( OWL.classAssertion( individualA, classE ) ) );

    OWL.manager.removeOntology( ontology );
  }
View Full Code Here

            + "BuiltInAtom(<http://www.w3.org/2003/11/swrlb#lessThan> Variable(<urn:swrl#y>) Variable(<urn:swrl#w>)))"
            + "Head(ObjectPropertyAtom(<http://www.w3.org/2006/time#before> Variable(<urn:swrl#x>) Variable(<urn:swrl#z>))))\n" +
            ")");

    OWLOntology ont = OWL.manager.loadOntologyFromOntologyDocument( source );
      PelletReasoner reasoner = com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.getInstance().createReasoner( ont );
      reasoner.getKB().realize();
  }
View Full Code Here

  private void testExplanation(OWLAxiom axiom) {
    OWLOntology ont = null;
    try {
      ont = OWL.Ontology(axiom);

      PelletReasoner reasoner = PelletReasonerFactory.getInstance().createReasoner( ont );
      reasoner.getKB().setDoExplanation( true );

      assertTrue( "Entailment failed", reasoner.isEntailed( axiom ) );

      Set<ATermAppl> terms = reasoner.getKB().getExplanationSet();
      assertTrue( "Explanation incorrect " + terms, terms.size() == 1);
     
      OWLAxiom explanation = new AxiomConverter(reasoner).convert(terms.iterator().next());
      assertEquals( "Unexpected explanation", axiom, explanation );
    }
View Full Code Here

  public PelletExplanation(OWLOntology ontology) {
    this( ontology, true );
  }
 
  public PelletExplanation(OWLOntology ontology, boolean useGlassBox) {
    this( new PelletReasonerFactory().createReasoner( ontology ), useGlassBox );
  }
View Full Code Here

    factory = reasoner.getManager().getOWLDataFactory();
   
    // Create a single explanation generator
    TransactionAwareSingleExpGen singleExp = useGlassBox
      ? new GlassBoxExplanation( reasoner )
      : new BlackBoxExplanation( reasoner.getRootOntology(), new PelletReasonerFactory(), reasoner );
   
    // Create multiple explanation generator
    expGen = new HSTExplanationGenerator( singleExp );   
   
    // Create the converter that will translate axioms into class expressions
View Full Code Here

  public GlassBoxExplanation(OWLOntology ontology, PelletReasonerFactory factory) {
    this( factory, factory.createReasoner( ontology ) );
  }
 
  public GlassBoxExplanation(PelletReasoner reasoner) {
    this( new PelletReasonerFactory(), reasoner );
  }
View Full Code Here

    converter = new SatisfiabilityConverter(OWL.factory);
    renderer = new ConciseExplanationRenderer();
   
    OWLOntology ontology = OWL.Ontology( ontologyAxioms );     

    PelletReasonerFactory reasonerFactory = PelletReasonerFactory.getInstance();
    reasoner = reasonerFactory.createReasoner( ontology );

    TransactionAwareSingleExpGen singleExpGen = useGlassBox
      ? new GlassBoxExplanation( reasoner )
      : new BlackBoxExplanation( ontology, reasonerFactory, reasoner ) {
          protected boolean isFirstExplanation() {
View Full Code Here

    converter = new SatisfiabilityConverter(OWL.factory);
    renderer = new ConciseExplanationRenderer();
   
    OWLOntology ontology = OWL.Ontology( ontologyAxioms );     

    PelletReasonerFactory reasonerFactory = PelletReasonerFactory.getInstance();
    reasoner = reasonerFactory.createReasoner( ontology );

    TransactionAwareSingleExpGen singleExpGen = useGlassBox
      ? new GlassBoxExplanation( reasoner )
      : new BlackBoxExplanation( ontology, reasonerFactory, reasoner ) {
          protected boolean isFirstExplanation() {
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.owlapiv3.EntailmentQueryVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.