Skip to content

Commit

Permalink
Merge pull request #501 from wcmc-its/canonicalPubTypeTweaks
Browse files Browse the repository at this point in the history
Added "guideline", "case report" canonical pub types; preferred PubMed as source
  • Loading branch information
paulalbert1 authored Jan 3, 2023
2 parents edf3f48 + 79ff1f6 commit 63b56a4
Showing 1 changed file with 48 additions and 42 deletions.
90 changes: 48 additions & 42 deletions src/main/java/reciter/algorithm/util/ArticleTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,45 +437,8 @@ public static ReCiterArticle translate(PubMedArticle pubmedArticle, ScopusArticl

private static void determinePublicationTypeCanonical(ReCiterArticle reCiterArticle, ScopusArticle scopusArticle) {
String publicationTypeCanonical = null;
if(reCiterArticle.getPublicationTypeScopus() != null && scopusArticle.getSubType() != null) {
if(scopusArticle.getSubType().equalsIgnoreCase("cp")
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Consensus Development Conference"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Consensus Development Conference, NIH"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Address"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Clinical Conference"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Congress"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Lecture"))) {
publicationTypeCanonical = "Conference Paper";
} else if(scopusArticle.getSubType().equalsIgnoreCase("re")) {
publicationTypeCanonical = "Review";
} else if(scopusArticle.getSubType().equalsIgnoreCase("rp")) {
publicationTypeCanonical = "Report";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ch")) {
publicationTypeCanonical = "Chapter";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ed")) {
publicationTypeCanonical = "Editorial Article";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ip")) {
publicationTypeCanonical = "In Process";
} else if(scopusArticle.getSubType().equalsIgnoreCase("bk")) {
publicationTypeCanonical = "Book";
} else if(scopusArticle.getSubType().equalsIgnoreCase("le")) {
publicationTypeCanonical = "Letter";
} else if(scopusArticle.getSubType().equalsIgnoreCase("no")) {
publicationTypeCanonical = "Comment";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ar")) {
publicationTypeCanonical = "Academic Article";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ab") || scopusArticle.getSubType().equalsIgnoreCase("bz") || scopusArticle.getSubType().equalsIgnoreCase("cr") || scopusArticle.getSubType().equalsIgnoreCase("sh")) {
publicationTypeCanonical = "Article";
}
}

if(publicationTypeCanonical == null && reCiterArticle.getPublicationTypePubmed() != null) {

if(publicationTypeCanonical == null && reCiterArticle.getPublicationTypePubmed() != null) {
if(reCiterArticle.getPublicationTypePubmed().contains("Editorial")) {
publicationTypeCanonical = "Editorial Article";
} else if(reCiterArticle.getPublicationTypePubmed().contains("Letter")) {
Expand All @@ -494,6 +457,10 @@ private static void determinePublicationTypeCanonical(ReCiterArticle reCiterArti
||
reCiterArticle.getPublicationTypePubmed().contains("Lecture")) {
publicationTypeCanonical = "Conference Paper";
} else if(reCiterArticle.getPublicationTypePubmed().contains("Guideline")
||
reCiterArticle.getPublicationTypePubmed().contains("Practice Guideline")) {
publicationTypeCanonical = "Guideline";
} else if(reCiterArticle.getPublicationTypePubmed().contains("Meta-Analysis")
||
reCiterArticle.getPublicationTypePubmed().contains("Review")
Expand All @@ -506,6 +473,8 @@ private static void determinePublicationTypeCanonical(ReCiterArticle reCiterArti
||
reCiterArticle.getPublicationTypePubmed().contains("Practice Guideline")) {
publicationTypeCanonical = "Review";
} else if(reCiterArticle.getPublicationTypePubmed().contains("Case Reports")) {
publicationTypeCanonical = "Case Report";
} else if(reCiterArticle.getPublicationTypePubmed().contains("Journal Article")
||
reCiterArticle.getPublicationTypePubmed().contains("Clinical Trial, Phase I")
Expand All @@ -530,8 +499,6 @@ private static void determinePublicationTypeCanonical(ReCiterArticle reCiterArti
||
reCiterArticle.getPublicationTypePubmed().contains("Pragmatic Clinical Trial")
||
reCiterArticle.getPublicationTypePubmed().contains("Case Reports")
||
reCiterArticle.getPublicationTypePubmed().contains("Clinical Study")
||
reCiterArticle.getPublicationTypePubmed().contains("Clinical Trial Protocol")
Expand All @@ -543,10 +510,49 @@ private static void determinePublicationTypeCanonical(ReCiterArticle reCiterArti
} else {
publicationTypeCanonical = "Article";
}
}


if(reCiterArticle.getPublicationTypeScopus() != null && scopusArticle.getSubType() != null) {
if(scopusArticle.getSubType().equalsIgnoreCase("cp")
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Consensus Development Conference"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Consensus Development Conference, NIH"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Address"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Clinical Conference"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Congress"))
||
(reCiterArticle.getArticleTitle() != null && reCiterArticle.getArticleTitle().contains("Lecture"))) {
publicationTypeCanonical = "Conference Paper";
} else if(scopusArticle.getSubType().equalsIgnoreCase("re")) {
publicationTypeCanonical = "Review";
} else if(scopusArticle.getSubType().equalsIgnoreCase("rp")) {
publicationTypeCanonical = "Report";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ch")) {
publicationTypeCanonical = "Chapter";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ed")) {
publicationTypeCanonical = "Editorial Article";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ip")) {
publicationTypeCanonical = "In Process";
} else if(scopusArticle.getSubType().equalsIgnoreCase("bk")) {
publicationTypeCanonical = "Book";
} else if(scopusArticle.getSubType().equalsIgnoreCase("le")) {
publicationTypeCanonical = "Letter";
} else if(scopusArticle.getSubType().equalsIgnoreCase("no")) {
publicationTypeCanonical = "Comment";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ar")) {
publicationTypeCanonical = "Academic Article";
} else if(scopusArticle.getSubType().equalsIgnoreCase("ab") || scopusArticle.getSubType().equalsIgnoreCase("bz") || scopusArticle.getSubType().equalsIgnoreCase("cr") || scopusArticle.getSubType().equalsIgnoreCase("sh")) {
publicationTypeCanonical = "Article";
}
}
reCiterArticle.setPublicationTypeCanonical(publicationTypeCanonical);
}
private static void populateFeatures(ReCiterArticle reCiterArticle, String nameIgnoredCoAuthors) {
List<String> ignoredCoAuthorNames = Arrays.asList(nameIgnoredCoAuthors.trim().split("\\s*,\\s*"));
ReCiterArticleFeatures reCiterArticleFeatures = new ReCiterArticleFeatures();
Expand Down

0 comments on commit 63b56a4

Please sign in to comment.