From 24de7910fdf3d086803cac3cf428041878e1427e Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Mon, 15 Feb 2021 22:24:16 +0100 Subject: workaround for a case found in refs: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * https://fatcat.wiki/release/2n7pyugxenb73gope52bn6m2ru * https://fatcat.wiki/release/p4bettvcszgn5d3zls5ogdjk4u Refs: Niaudet P. Steroid-sensitive idiopathic nephrotic syndrome in children. Pediatric Nephrology. 5th ed. Philadelphia: Lippincott Williams & Wilkins, 2004; pp 543–556. Doc: * https://fatcat.wiki/release/lc3d5q62zfa2rjyk2m7nr346nm, T-lymphocyte activation in steroid-sensitive nephrotic syndrome in childhood, by T J Neuhaus, V Shah, R E Callard, T M Barratt --- fuzzycat/verify.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py index b7c9694..45a809e 100644 --- a/fuzzycat/verify.py +++ b/fuzzycat/verify.py @@ -500,6 +500,12 @@ def verify(a: Dict, b: Dict, min_title_length=5) -> Tuple[str, str]: if a_slug_title and b_slug_title and a_slug_title.strip().replace( " ", "") == b_slug_title.strip().replace(" ", ""): if len(a_slug_authors & b_slug_authors) > 0: + # At this point, year might differ, e.g. + # https://fatcat.wiki/release/2n7pyugxenb73gope52bn6m2ru vs + # https://fatcat.wiki/release/p4bettvcszgn5d3zls5ogdjk4u (found via refs). + if a_release_year and b_release_year and abs(int(a_release_year) - + int(b_release_year)) > 4: + return Verify(Status.DIFFERENT, Reason.YEAR) return Verify(Status.STRONG, Reason.SLUG_TITLE_AUTHOR_MATCH) # if any([a_authors, b_authors]) and not (a_authors and b_authors): -- cgit v1.2.3