I have a long string containing a bibliography, alternating between lines of paper-title/comma-separated-author-list, like the following:
Learning Programs: A Bayesian Approach
P. Liang, M. Jordan, D. Klein
Variational methods for a Dirichelet process
D. Blei, M. Jordan
What I want is a list of unique authors (alphabetized by last name) and counts. In the above example it would be:
D. Blei (1)
M. Jordan (2)
D. Klein (1)
P. Liang (1)
Can anyone tell me how to do this in Perl or visual basic? Thanks so much — you rock!!!
In perl, what you’ll need to do is read through the input, making every other line the author line: