Package owlsmx.Indexer

Examples of owlsmx.Indexer.SimpleIndex


public static void main(String[] args) {   
    String test = "and([prime-http://www.develin.de/owl#DieselFZ,and([all(http://www.develin.de/owl#faehrtMit,and([prime-http://www.develin.de/owl#Diesel,http://www.develin.de/owl#Krafstoff])),and([prime-http://www.develin.de/owl#KFZ,and([and([and([and([all(http://www.develin.de/owl#faehrtAuf,and([prime-http://www.develin.de/owl#Rad,_TOP_])),all(http://www.develin.de/owl#angetriebenDurch,and([prime-http://www.develin.de/owl#Motor,_TOP_]))]),all(http://www.develin.de/owl#moeglicherUntergrund,and([prime-http://www.develin.de/owl#Strasse,_TOP_]))]),all(http://www.develin.de/owl#faehrtMit,and([prime-http://www.develin.de/owl#Kraftstoff,_TOP_]))]),and([prime-http://www.develin.de/owl#FZ,_TOP_])])])])])";
    Map pc = getPrimitiveConcepts(test);
    CollectionUtils.print(pc);
    SimpleIndex index = SimpleIndex.instanceOf();
    index.addDocument("DieselFZ",pc);

    if (index.getIDF("_TOP_")==0.2)
        System.out.println("IDF of _TOP_: 0.2 ");
    else
        System.out.println("Miscalculated IDF of _TOP_ it should be 0.2 but is " + index.getIDF("_TOP_"));
  }
View Full Code Here

TOP

Related Classes of owlsmx.Indexer.SimpleIndex

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.