Skip to content

Commit

Permalink
Merge pull request #20 from phenoscape/develop
Browse files Browse the repository at this point in the history
Add input argument for output filename
  • Loading branch information
Shalsh23 authored Nov 9, 2018
2 parents 576520e + 98c469d commit b4e561a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ object RunPairwiseOWLSim extends App {
val ontfile = new File(args(2))
val profilesFile = new File(args(3))
val corpus = args(4)
val outfile = args(5)

val manager = OWLManager.createOWLOntologyManager()
val ontology = manager.loadOntologyFromOntologyDocument(ontfile)
Expand All @@ -42,7 +43,7 @@ object RunPairwiseOWLSim extends App {
println("Computing similarity matrix")
val similarityMatrix = owlSim.computeAllSimilarityToCorpus(group.toSet)
println("Writing results to file")
val triplesOutput = new BufferedOutputStream(new FileOutputStream(new File(s"similarities-$taskNum.ttl")))
val triplesOutput = new BufferedOutputStream(new FileOutputStream(new File(outfile)))
val writer = Rio.createWriter(RDFFormat.TURTLE, triplesOutput)
writer.startRDF()
similarityMatrix.foreach(writer.handleStatement)
Expand Down

0 comments on commit b4e561a

Please sign in to comment.