LUBM (Lehigh university benchmark) tutorial

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 type the comand   

cd /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 -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 )

   option example:

java edu.lehigh.swat.bench.uba.Generator -univ 2 -index 0 -seed 0 -onto http://swat.cse.lehigh.edu/onto/univ-bench.owl

    This will generate 2 universities data, with the default data in OWL file. If you want to generate daml, then add " -daml" before "-onto". 

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

9. Is this tutorial easy to folow? Let me know. :-)

转载于:https://www.cnblogs.com/RuiYan/p/4793482.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值