diff --git a/src/main/java/reciter/algorithm/util/ArticleTranslator.java b/src/main/java/reciter/algorithm/util/ArticleTranslator.java index 59b425f1..2b52a6ea 100644 --- a/src/main/java/reciter/algorithm/util/ArticleTranslator.java +++ b/src/main/java/reciter/algorithm/util/ArticleTranslator.java @@ -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")) { @@ -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") @@ -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") @@ -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") @@ -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 ignoredCoAuthorNames = Arrays.asList(nameIgnoredCoAuthors.trim().split("\\s*,\\s*")); ReCiterArticleFeatures reCiterArticleFeatures = new ReCiterArticleFeatures();