added other counts

This commit is contained in:
Sandro La Bruzzo 2022-10-21 11:08:05 +02:00
parent faa1c38b29
commit f36f9c4fda
1 changed files with 4 additions and 4 deletions

View File

@ -49,9 +49,9 @@ class CheckRelation( args: Array[String], log: Logger) extends AbstractScalaAppl
val df = spark.read.text(path).as[String]
val mapper = new ObjectMapper()
// val total = df.count
// val not_del_rel =df.map(s=> mapper.readValue(s, classOf[Relation])).as[Relation].filter(r => r.getDataInfo.getDeletedbyinference == false).count()
// logger.warn(s"Total number of relations not deleted by Inference: $not_del_rel/$total")
val total = df.count
val not_del_rel =df.map(s=> mapper.readValue(s, classOf[Relation])).as[Relation].filter(r => r.getDataInfo.getDeletedbyinference == false).count()
logger.warn(s"Total number of relations not deleted by Inference: $not_del_rel/$total")
@ -61,7 +61,7 @@ class CheckRelation( args: Array[String], log: Logger) extends AbstractScalaAppl
.filter(r => filterRelations(r))
.count()
logger.warn(s"Relation used by Scholexplorer $total_rels_from_scholexplorer")
logger.warn(s"Relation used by Scholexplorer $total_rels_from_scholexplorer/$not_del_rel")
}