首页 > 其他 > 详细

LUBM (Lehigh university benchmark) tutorial

时间:2015-09-09 06:14:19      阅读:407      评论:0      收藏:0      [点我收藏+]

This little tutorial teaches you step by step how to use LUBM to benchmark your semantic system.

1. Here is the official site of LUBM: http://swat.cse.lehigh.edu/projects/lubm/ 

2. download files as follows: 

   - the Univ-Ben benchmark ontology: http://swat.cse.lehigh.edu/onto/univ-bench.owl

   - the data generator (UBA) v1.7: http://swat.cse.lehigh.edu/projects/lubm/uba1.7.zip

   - the tester (UBT) v1.1: http://swat.cse.lehigh.edu/projects/lubm/ubt1.1.zip

3. what LUBM does is that it provide a small ontology of college departments, classes and professors. A data generater generates arbitrary large ABox statements. 14 different queries are provided in SPARQL 1.0 to test the system response time.

4.   if you are using linux, you need to download a fix for UBA data generator: http://swat.cse.lehigh.edu/projects/lubm/GeneratorLinuxFix.zip

This fix makes sure the Generator works with Linux paths. 

The reason is because UBA generates path with a "\", but Linux uses "/" in the path. 

You unzip this fix patch, it‘s called "Generator.java" as well. 

You unzip the UBA v1.7, and go to src/edu/lehigh/swat/bench/uba directory, to replace the original Generator.java with this fix Generator.java

If you don‘t use the fix, it will generate the data in the path like this: 

/home/rui/Desktop\University0_18.daml generated

But when you go to Desktop, it‘s not there. That‘s because Linux path doesn‘t support "\". 

5. You need to compile the java file.

My unzipped UBA v1.7 files are in /home/rui/Desktop/UBA1.7/src/edu/lehigh/swat/bench/uba directory

Yes, there is also a class directory in /home/rui/Desktop/UBA1.7/classes ..., but we are not going to use it. 

I go to  /home/rui/Desktop/UBA1.7/src/edu/lehigh/swat/bench/uba, 

then type the compile command: 

javac -d /home/rui/Desktop *.java

This command will compile all the java file, and the compiled class will be stored in /home/rui/Desktop.

After this, you go to Desktop, and you will see a folder called "edu". 

You open that folder and you will see that it‘s actually edu/lehigh/swat/bench/uba/*.class, these class files are what we want. 

6. Now we can run the data generator 

You are now in Desktop directory, and run the command: 

java edu.lehigh.swat.bench.uba.Generator -univ <value> -index <value> -seed <value> -daml <value> -onto <value>

   options:
      -univ number of universities to generate; 1 by default
      -index starting index of the universities; 0 by default
      -seed seed used for random data generation; 0 by default
      -daml generate DAML+OIL data; OWL data by default
      -onto url of the univ-bench ontology ( http://swat.cse.lehigh.edu/onto/univ-bench.owl ) ( http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl [easier for query test])

7. You will have the generated data then. 

8. There are 14 SPARQL 1.0 queries provided here: http://swat.cse.lehigh.edu/projects/lubm/queries-sparql.txt

LUBM (Lehigh university benchmark) tutorial

原文:http://www.cnblogs.com/RuiYan/p/4793482.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!