Skip to content

Commit c9c6890

Browse files
authored
Early vs full article (#50)
* cases and match-condition (#49) * case and match condition
1 parent 5b96dcb commit c9c6890

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

bib_dedupe/match_conditions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ def both_entrytypes(entrytype: str) -> str:
9292
f"(({match(DOI)} & ~(doi_1 == '' | doi_2 == '')) & ({TITLE} > 0.95) & ({AUTHOR} > 0.9) & ({YEAR} > 0.9)) & {non_contradicting(CONTAINER_TITLE)} ",
9393
# no TITLE
9494
f"({au10_tiXX_ct10} & {match(VOLUME, NUMBER, PAGES, YEAR)} & {non_contradicting(DOI)} & ({ABSTRACT} > 0.95 | {non_contradicting(ABSTRACT)}))", # typically for number-mismatches in title
95+
# early_view_vs_final
96+
f"({au095_ti09_ct075}"
97+
f" & {non_contradicting(DOI)}"
98+
f" & ((volume_1 != '' & volume_2 == '') | (volume_2 != '' & volume_1 == ''))"
99+
f" & ((number_1 != '' & number_2 == '') | (number_2 != '' & number_1 == '') | {non_contradicting(NUMBER)})"
100+
f" & (pages_1.str.match('^1[-–]') | pages_2.str.match('^1[-–]'))"
101+
f")",
95102
]
96103

97104
non_duplicate_conditions = [

tests/test_cases.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,32 @@
527527
"booktitle": "Americas Conference on Information Systems"
528528
},
529529
"expected_duplicate": false
530+
},
531+
{
532+
"id": "pare_wagner_prester_jds_2024_vs_2023_online_first",
533+
"note": "Likely same article; year/pages differ (online-first vs issue); record_a includes DOI.",
534+
"record_a": {
535+
"ENTRYTYPE": "article",
536+
"ID": "1",
537+
"author": "Paré, Guy and Wagner, Gerit and Prester, Julian",
538+
"title": "How to develop and frame impactful review articles: key recommendations",
539+
"journal": "Journal of Decision Systems",
540+
"year": "2024",
541+
"volume": "33",
542+
"number": "4",
543+
"pages": "566--582",
544+
"doi": "10.1080/12460125.2023.2197701"
545+
},
546+
"record_b": {
547+
"ENTRYTYPE": "article",
548+
"ID": "2",
549+
"author": "Paré, Guy and Wagner, Gerit and Prester, Julian",
550+
"title": "How to develop and frame impactful review articles: key recommendations",
551+
"journal": "Journal of Decision Systems",
552+
"year": "2023",
553+
"pages": "1--17"
554+
},
555+
"expected_duplicate": true
530556
}
531557
]
532558
}

0 commit comments

Comments
 (0)