Package org.mindswap.pellet

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


    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


    if( !isConsistent )
      throw new PelletCmdException( "Ontology is inconsistent, run \"pellet explain\" to get the reason" );

    startTask( "classification" );
    kb.classify();
    finishTask( "classification" );

    TaxonomyPrinter<ATermAppl> printer = new ClassTreePrinter();
    printer.print( kb.getTaxonomy() );
  }
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

    kb.addType( term( "a" ), term( "C" ) );

    kb.addIndividual( term( "b" ) );
    kb.addType( term( "b" ), term( "D" ) );

    kb.classify();

    assertTrue( kb.getDifferents( term( "a" ) ).contains( term( "b" ) ) );
    assertTrue( kb.getDifferents( term( "b" ) ).contains( term( "a" ) ) );
  }
View Full Code Here

    // EL classifier
    kb.addSubClass( C, min( p, 2, TOP ) );

    assertTrue( kb.isConsistent() );

    kb.classify();

    assertTrue( kb.isEquivalentClass( A, TOP ) );
    assertFalse( kb.isEquivalentClass( B, TOP ) );
  }
View Full Code Here

    kb.addEquivalentClass( A, or( B, not( B ) ) );

    assertTrue( kb.isConsistent() );

    kb.classify();

    assertTrue( kb.isEquivalentClass( A, TOP ) );
    assertFalse( kb.isEquivalentClass( B, TOP ) );
  }
View Full Code Here

    kb.addEquivalentClass( B, or( B, not( B ) ) );
    kb.addSubClass( C, A );

    assertTrue( kb.isConsistent() );

    kb.classify();

    assertTrue( kb.isEquivalentClass( A, TOP ) );
    assertTrue( kb.isEquivalentClass( B, TOP ) );
    assertFalse( kb.isEquivalentClass( C, TOP ) );
  }
View Full Code Here

    kb.addClass( D );
    kb.addSubClass( C, B );
    kb.addSubClass( D, C );
    kb.addEquivalentClass( D, B );

    kb.classify();

    assertTrue( kb.isEquivalentClass( B, C ) );
    assertTrue( kb.isEquivalentClass( B, D ) );
    assertTrue( kb.isEquivalentClass( D, C ) );
  }
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.