Examples of PelletReasonerFactory


Examples of com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory

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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory

    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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory

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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory

    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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory

    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

Examples of org.semanticweb.reasonerfactory.pellet.PelletReasonerFactory

    org.mindswap.pellet.utils.Timers timers  = new Timers();
    timers.createTimer("classification");
   
    OWLReasonerFactory reasonerFactory = null;
    switch (selectReasoner){
      case 1: reasonerFactory = new PelletReasonerFactory(); break;
      case 2: reasonerFactory = new FaCTPlusPlusReasonerFactory(); break;
      default: reasonerFactory = new PelletReasonerFactory(); break;
    }
   
    OWLReasoner reasoner = reasonerFactory.createReasoner(manager);
   
    logger.info("Reasoner: "+reasonerFactory.getReasonerName());
View Full Code Here

Examples of org.semanticweb.reasonerfactory.pellet.PelletReasonerFactory

      timers.createTimer("classification");
      timers.createTimer("approximation");
     
      OWLReasonerFactory reasonerFactory = null;
      switch (selectReasoner){
        case 1: reasonerFactory = new PelletReasonerFactory(); break;
        case 2: reasonerFactory = new FaCTPlusPlusReasonerFactory(); break;
        default: reasonerFactory = new PelletReasonerFactory(); break;
      }     
     
      /* Initialize manager used for loading the Abox */
      OWLOntologyManager manager = null;
      manager = OWLManager.createOWLOntologyManager();
View Full Code Here

Examples of org.semanticweb.reasonerfactory.pellet.PelletReasonerFactory

    /* Create the reasoner factory according to the reasoner we want to use */
    OWLReasonerFactory reasonerFactory = null;
    switch (selectReasoner)
    {
    case 1:
      reasonerFactory = new PelletReasonerFactory();
      break;
    case 2:
      reasonerFactory = new FaCTPlusPlusReasonerFactory();
      break;
    default:
      reasonerFactory = new PelletReasonerFactory();
      break;
    }

    try
    {
View Full Code Here

Examples of org.semanticweb.reasonerfactory.pellet.PelletReasonerFactory

    int runCounter = 1;
    while (true)
    {
      System.out.println("Running Approximation No. " + runCounter);
      OWLReasonerFactory reasonerFactory = new PelletReasonerFactory();
      // OWLReasonerFactory reasonerFactory = new
      // FaCTPlusPlusReasonerFactory();
      OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
      OWLReasoner reasoner = null;

      OWLOntology aboxOntology = null;
      ApproximationResult approximationResult = null;
      OWLOntology approximatedTboxOntology = null;

      HashMap<OWLClass, Integer> allIndividualsCounts = new HashMap<OWLClass, Integer>();
      HashMap<OWLClass, Integer> directIndividualsCounts = new HashMap<OWLClass, Integer>();
      HashMap<OWLClass, Integer> indirectIndividualsCounts = new HashMap<OWLClass, Integer>();

      int cumulativeDirectIndividualsCounts = 0;
      int cumulativeIndirectIndividualsCounts = 0;

      Timers timers = new Timers();

      double classificationTime = 0;
      double approximationTime = 0;
      double instanceRetrievalTime = 0;
      double aboxUpdateTime = 0;
      double time = 0;

      // System.out.println("--->approximating...");
      timers.createTimer("approximation");
      Timer timerApproximation = timers.startTimer("approximation");
      approximationResult = approximation.getNextTBox();
      timerApproximation.stop();
      if (measureApproximationTime)
      {
        approximationTime += timerApproximation.getTotal();
      }

      if (approximationResult != null)
      {
        approximatedTboxOntology = approximationResult
            .approximatedOntology();

        URI tboxPhysicalURI = createURI(tmpTboxPhysicalURI, runCounter);
        if (saveApproximatedTbox)
        {
          saveOntology(approximatedTboxOntology, tboxPhysicalURI);
        }

        // System.out.println("--->classifying...");
        reasoner = reasonerFactory.createReasoner(manager);
        reasoner.loadOntologies(Collections
            .singleton(approximatedTboxOntology));
        timers.createTimer("classification");
        if (!(reasoner.isClassified()))
        {
View Full Code Here

Examples of org.semanticweb.reasonerfactory.pellet.PelletReasonerFactory

      Set<OWLClass> classes, Set<OWLProperty<?, ?>> properties)
      throws OWLReasonerException
  {
    System.out.println("Running Full Ontology..." + tboxURI.toString());
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    OWLReasonerFactory reasonerFactory = new PelletReasonerFactory();
    // OWLReasonerFactory reasonerFactory = new
    // FaCTPlusPlusReasonerFactory();
    OWLReasoner reasoner = null;
    OWLOntology tboxOntology = null, aboxOntology = null;

    fullCassIndividuals = new HashMap<OWLClass, Set<OWLIndividual>>();
    Set<OWLIndividual> allIndividuals;
    Set<OWLIndividual> directIndividuals;

    HashMap<OWLClass, Integer> allIndividualsCounts = new HashMap<OWLClass, Integer>();
    HashMap<OWLClass, Integer> directIndividualsCounts = new HashMap<OWLClass, Integer>();
    HashMap<OWLClass, Integer> indirectIndividualsCounts = new HashMap<OWLClass, Integer>();

    int cumulativeIndividualsCount = 0;
    int cumulativeDirectindividualsCount = 0;
    int cumulativeIndirectIndividualsCount = 0;

    Timers timers = new Timers();
    double time = 0;
    double classificationTime = 0;
    double instanceRetrievalTime = 0;

    try
    {
      tboxOntology = manager.loadOntology(tboxURI);
      aboxOntology = manager.loadOntology(aboxURI);

    } catch (OWLOntologyCreationException e)
    {
      e.printStackTrace();
      System.exit(0);
    }

    // System.out.println("--->classifying...");
    reasoner = reasonerFactory.createReasoner(manager);
    reasoner.loadOntologies(Collections.singleton(tboxOntology));
    reasoner.loadOntologies(Collections.singleton(aboxOntology));
    timers.createTimer("classification");

    if (!reasoner.isClassified())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.