New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Class Hierarchy Depth measure #64

Closed
LorenzBuehmann opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@LorenzBuehmann
Copy link
Member

LorenzBuehmann commented Jul 2, 2018

def ClassHierarchyDepth(triples: RDD[Triple]): VertexRDD[Int] = {
val uc_triples = triples
.filter(triple => (triple.predicateMatches(RDFS.subClassOf.asNode()) &&
triple.getSubject.isURI && triple.getObject.isURI))
val graph = uc_triples.asGraph()
graph.inDegrees
}

this doesn't compute the depth of the class hierarchy but just the in-degree for each node connected via rdfs:subClassOf property. the same holds for the property hierarchy:

def PropertyHierarchyDepth(triples: RDD[Triple]): VertexRDD[Int] = {
val uc_triples = triples
.filter(triple => (triple.predicateMatches(RDFS.subPropertyOf.asNode()) &&
triple.getSubject.isURI && triple.getObject.isURI))
val graph = uc_triples.asGraph()
graph.inDegrees
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment