Package org.semanticweb.reasonerfactory.pellet

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


      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

    /* 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

    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

      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

Related Classes of org.semanticweb.reasonerfactory.pellet.PelletReasonerFactory

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.