Package org.mindswap.pellet

Examples of org.mindswap.pellet.KnowledgeBase.classify()


    OWLOntology ont = loadOntology( base + "food.owl" );
    pellet.loadOntology( ont );

    try {
      kb.classify();
    } catch( TimeoutException e ) {
      timeout = true;
    }

    assertTrue( timeout );
View Full Code Here


    OWLOntology ont = loadOntology( base + "food.owl" );
    pellet.loadOntology( ont );

    try {
      kb.classify();
    } catch( TimeoutException e ) {
      timeout = true;
    }

    assertFalse( timeout );
View Full Code Here

    kb.addEquivalentClass( D, and( some( p, A ), min( p, 1, value(b) ), min( p, 1, value(c) ), max( p, 1,
        TOP ) ) );   
   
    assertTrue( kb.isConsistent() );

    kb.classify();
   
    assertTrue( kb.isSubClassOf( D, B ) );
    assertTrue( kb.isSubClassOf( D, C ) );
  }
 
View Full Code Here

    kb.addClass( A );
    kb.addObjectProperty( p );

    kb.addDisjointClasses( Arrays.asList( A, self(p) ) );   

    kb.classify();
   
    assertTrue( kb.isSatisfiable( A ) );
  }
 
  @Test
View Full Code Here

    // A is not primitive because of the domain axiom
    kb.addDomain( p, A );
    // C should be inferred to be a subclass of A and B
    kb.addSubClass( C, some(p, TOP_LIT ) );
   
    kb.classify();
   
    assertSubClass( kb, C, A );
    assertSubClass( kb, C, B );
 
 
View Full Code Here

    assertSubClass( kb, A, B );

    assertSubClass( kb, B, C );
   
    kb.classify();
  }
 
  @Test
  public void testNominalCache() {
    // this case tests isMergable check and specifically the correctness of
View Full Code Here

    kb.addIndividual( c );
   
    kb.addType( a, C );
           
    // kb will be in classified state
    kb.classify();
   
    assertTrue( kb.isType( a, D ) );
    assertFalse( kb.isType( b, D ) );
    assertFalse( kb.isType( c, D ) );
   
View Full Code Here

      OWLOntology ont = loadOntology( base + "food.owl" );
     
      PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont );
      KnowledgeBase kb = pellet.getKB();
 
      kb.classify();
 
      kb.getTaxonomyBuilder().setProgressMonitor( monitor );
 
      kb.realize();
 
View Full Code Here

    Timer timer = kb.timers.createTimer( "classify" );
    timer.setTimeout( 1 );


    try {
      kb.classify();
    } catch( TimeoutException e ) {
      timeout = true;
    }

    assertTrue( timeout );
View Full Code Here

    Timer timer = kb.timers.createTimer( "realize" );
    timer.setTimeout( 1 );

    try {
      kb.classify();
    } catch( TimeoutException e ) {
      timeout = true;
    }

    assertFalse( timeout );
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.