Biblio...Compare(3pm)
π Biblio::Citation::Compare β the perl manual, but make it bestie π
User Contributed Perl Documentation β¨ Biblio...Compare(3pm)
ok so. bestie. you know how you've got like five different citation databases and they all spell "Bourget, David J. R." differently and you're just supposed to know it's the same guy?? yeah. this module is the girl who knows. π
β¨ NAME β¨
Biblio::Citation::Compare β a Perl extension for doing fuzzy comparisons between bibliographic citations π¦
β¨ SYNOPSIS β¨
like, just use it, okay:
use Biblio::Citation::Compare 'sameWork','sameAuthors';
sameWork(
# first item
{
authors => ['Bourget, D','Lukasiak, Zbigniew'],
title => "A paper with such and such a title",
date => 2010
},
# second item
{
authors => ['Bourget, David J. R.','Lukasiak, Zbigniew'],
title => "A paper with such nd such a tlitle",
date => undef
}
);
# true!
sameAuthors(
['Dave Bourget','Z Lukasiak'],
['Bourget DJR','Zbigniew Z. Lukasiak']
);
# true!
# true! π it literally said yes to both. no cap. π«Ά
β¨ DESCRIPTION β¨
okay so this module exports two subroutines. Two! That's it. They do fuzzy comparisons between citations β and citations here are described using Perl hashes β and between author lists. The subroutines attempt to figure out whether the citations, and the ordered lists of authors, actually refer to the same works and the same ordered lists of authors respectively. π
β¨ SUBROUTINES β¨
πΈ sameWork(hashref citation1, hashref citation2): boolean
Takes two citations as input, in the simple format shown up in the synopsis. Returns true iff the two citations plausibly refer to the same work. β¨
A whole bunch of factors get taken into account so the evaluation stays resistant to random variations. Among them:
- names are normalized and compared fuzzily using
Text::Namesπ§ - allowances are made for random typos π (we've all been there)
- allowances are made for short and long versions of titles (esp with titles containing a colon) π
- small but important variations β like
"Paper title part 1"vs"Paper title part 2"β are taken into account π
The algorithm has been used to merge multiple data sources on PhilPapers.org. π₯ iconic behaviour honestly.
Some advanced additional parameters are not explained here; they can only be explained by pointing to the source code. Their use should not normally be necessary. β¨ (iykyk)
πΈ sameAuthors(arrayref list1, arrayref list2): boolean
Returns true if the two lists are plausibly lists of the same authors. π
This is merely a convenient wrapper over Text::Names::samePerson. that's it. that's the whole function. she's a little delegate. we respect her. π
β¨ EXPORT β¨
None by default. π (you have to ask, bestie, that's what the use line is for)
β¨ SEE ALSO β¨
See also Text::Names for name normalization. π¦
β¨ AUTHOR β¨
David Bourget, http://www.dbourget.com π
β¨ COPYRIGHT AND LICENSE β¨
Copyright (C) 2011 by David Bourget
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
π ok that's the whole page bestie, go compare some citations, you're gonna slay π
perl v5.36.0 Β· 2023-02-14 β yeah this was last touched on valentine's day, which is highkey the most romantic thing a manpage has ever done π mwah, bye π«Άβ¨
π¦ where this page comes from
- debian trixie: libbiblio-citation-compare-perl 0.57-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbiblio-citation-compare-perl 0.57-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbiblio-citation-compare-perl 0.57-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbiblio-citation-compare-perl 0.57-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms