<div dir="ltr">Well, if you can create targets for the in-text citations, and feed the text body into the parser to look for these, you could then take the hashrefs and use them to generate a skeleton of a bibliography that you can fill out later. I.e. for a text reference of "see Foo and Bar (2001)" you'll only have the author(s) and year for what's in the text, but you could take that, feed it into a template system like Template::Toolkit, and spit out a bibliography with 'TODO' or 'XXX' in the missing fields: <div>   Foo, XXX. & Bar XXX. (2001)  XXX_TITLE. XXX_JOURNAL, XXX_VOL, XXX_PAGES.</div><div>Then go back and fill in the missing fields.</div><div><div>And when done with writing both the text and the bibliography, you can rescan both to check that there's no mismatches. Of course, that won't help you if in one place you site Foo & Bar (2001) but you meant to site Foo & Bar (2002), and you do also correctly site both of these elsewhere.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 6, 2018 at 11:21 PM, Alan Mead <span dir="ltr"><<a href="mailto:amead@alanmead.org" target="_blank">amead@alanmead.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mike,<br>
<br>
Thanks! This is extremely interesting. I didn't know about this. But<br>
this is the second half of the issue (parsing the reference list). It<br>
would greatly enhance my hypothetical script to add this capability and<br>
check the in-text citations match one (and only one) of the references.<br>
And, I agree, using this mechanism, I could generate a list of "targets"<br>
that would make it easier to find those citations.<br>
<br>
But I was hoping to be able to parse text where the reference list<br>
hadn't been created to facilitate the creation of the reference list.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Alan<br>
</font></span><span class="im HOEnZb"><br>
On 5/6/2018 9:28 PM, Mike Fragassi wrote:<br>
> Biblio::Citation::Parser may help you.  First, seems like it should be<br>
> able to parse the references listed in an article's bibliography:<br>
><br>
> use Biblio::Citation::Parser::<wbr>Standard;<br>
> my $ref = 'Gleditsch, N. P., Pinker, S., Thayer, B. A., Levy, J. S., &<br>
> Thompson, W. R. (2013). The forum: The decline of war. International<br>
> Studies Review, 15(3), 396-419.'; <br>
> # example from <a href="http://www.citationmachine.net/apa/cite-a-book" rel="noreferrer" target="_blank">http://www.<wbr>citationmachine.net/apa/cite-<wbr>a-book</a><br>
> my $cit_parser = new Biblio::Citation::Parser::<wbr>Standard;<br>
> my $metadata = $cit_parser->parse($ref);<br>
> print Dumper($metadata);<br>
><br>
> The $metadata is a hashref of valid values parsed from the string,<br>
> including the rule that the parser used to identify the parts, that<br>
> looks like this:<br>
><br>
>    'match' => '_AUTHORS_ (_YEAR_). _TITLE_. _PUBLICATION_,<br>
> _VOLUME_(_ISSUE_), _PAGES_',<br>
><br>
> The 'match' seem to come from Biblio::Citation::Parser:<wbr>:Templates, and<br>
> you should be able to modify this to look for things like '(_AUTHORS_,<br>
> _YEAR_)' etc.  (Note: I've never used this module myself before now.) <br>
><br>
<br>
<br>
</span><span class="im HOEnZb">-- <br>
<br>
Alan D. Mead, Ph.D.<br>
President, Talent Algorithms Inc.<br>
<br>
science + technology = better workers<br>
<br>
<a href="http://www.alanmead.org" rel="noreferrer" target="_blank">http://www.alanmead.org</a><br>
<br>
I've... seen things you people wouldn't believe...<br>
functions on fire in a copy of Orion.<br>
I watched C-Sharp glitter in the dark near a programmable gate.<br>
All those moments will be lost in time, like Ruby... on... Rails... Time for Pi.<br>
<br>
          --"The Register" user Alister, applying the famous <br>
            "Blade Runner" speech to software development<br>
</span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/<wbr>listinfo/chicago-talk</a><br>
</div></div></blockquote></div><br></div>