From 715a35715609d8cbacff53dd5c7c1715c53a55f8 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 23 Aug 2018 19:22:11 -0700 Subject: require crossref works to have at least one author (for matching) --- scalding/src/main/scala/sandcrawler/CrossrefScorable.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scalding/src/main') diff --git a/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala b/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala index babb4f9..baa1ca9 100644 --- a/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala +++ b/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala @@ -90,7 +90,7 @@ object CrossrefScorable { val doi = Scorable.getString(map, "DOI") val authors: List[String] = mapToAuthorList(map) val year: Int = mapToYear(map).getOrElse(0) - if (doi.isEmpty || doi == null) { + if (doi.isEmpty || doi == null || authors.length == 0) { MapFeatures(Scorable.NoSlug, json) } else { val sf : ScorableFeatures = ScorableFeatures.create(title=title, authors=authors, doi=doi.toLowerCase(), year=year) -- cgit v1.2.3