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 Distinct entities measure #62

LorenzBuehmann opened this Issue Jul 2, 2018 · 0 comments


None yet
3 participants
Copy link

LorenzBuehmann commented Jul 2, 2018

class DistinctEntities(triples: RDD[Triple], spark: SparkSession) extends Serializable {
def Filter(): RDD[Triple] = triples.filter(f =>
(f.getSubject.isURI() && f.getPredicate.isURI() && f.getObject.isURI()))
def Action(): RDD[Triple] = Filter().distinct()
def PostProc(): Long = Action().count()
def Voidify(): RDD[String] = {
var ents = new Array[String](1)
ents(0) = "\nvoid:entities " + PostProc() + ";"
object DistinctEntities {
def apply(triples: RDD[Triple], spark: SparkSession): DistinctEntities = new DistinctEntities(triples, spark)

does not do what I'd expect. It should return a set of nodes which are IRIs, but computes just triples where s,p, and o are IRIs.

That's also the reason why the unit test results in 0 ...

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