-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/scala/com/signalcollect/triplerush/evaluation/demo/LocalDbpediaDemo.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.signalcollect.triplerush.evaluation.demo | ||
|
||
import com.signalcollect.triplerush.TripleRush | ||
import com.signalcollect.triplerush.optimizers.NoOptimizerCreator | ||
import com.signalcollect.triplerush.QuerySpecification | ||
import com.signalcollect.triplerush.TriplePattern | ||
import scala.concurrent.Await | ||
import scala.concurrent.duration.DurationInt | ||
import com.signalcollect.triplerush.Dictionary | ||
|
||
object LocalDbpediaDemo extends App { | ||
|
||
def loadDbpediaFromNt(triplerush: TripleRush) { | ||
println(s"Loading Dbpedia ...") | ||
triplerush.loadNtriples("./dbpedia_10000.nt") | ||
println(s"Done loading Dbpedia.") | ||
} | ||
|
||
val tr = new TripleRush(optimizerCreator = NoOptimizerCreator) | ||
tr.prepareExecution | ||
|
||
val entities = List("11th_Marine_Expeditionary_Unit", "1250", "11th_century", "12-hour_clock") | ||
loadDbpediaFromNt(tr) | ||
|
||
val entitiesForEntities = DbpediaIframeGenerator.getEntitiesForEntities(tr, entities) | ||
tr.shutdown | ||
//println(entitiesForEntities.mkString("\n")) | ||
} |