diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-02-15 22:24:16 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-02-15 22:24:16 +0100 |
commit | 24de7910fdf3d086803cac3cf428041878e1427e (patch) | |
tree | 7b6dc5d29e322a5e6cb4cdb947309cf6fe1c90d8 /fuzzycat | |
parent | 2641c512b8626e5ac0698eb47ed3ffc4c5b80a3b (diff) | |
download | fuzzycat-24de7910fdf3d086803cac3cf428041878e1427e.tar.gz fuzzycat-24de7910fdf3d086803cac3cf428041878e1427e.zip |
workaround for a case found in refs:
* 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
Diffstat (limited to 'fuzzycat')
-rw-r--r-- | fuzzycat/verify.py | 6 |
1 files changed, 6 insertions, 0 deletions
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): |