Skip to content

Commit

Permalink
added dictionary getter
Browse files Browse the repository at this point in the history
  • Loading branch information
lukovnikov committed Feb 11, 2015
1 parent cbc720f commit 80d9b72
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ object RDFLoader extends Logging {
return graph // so far
} // end of edgeListFile


/**
* Gets dictionary for entities (not properties) from the provided graph.
*/
def getdictionary(graph:Graph[String,String]): RDD[(Long,String)] = {
val vertices = graph.vertices.map(x => (x._1.toLong, x._2))
return vertices
}


/**
* Implements a simple hashing function for Strings
*/
Expand Down

0 comments on commit 80d9b72

Please sign in to comment.