The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Biblio::DocParser::Standard - document parsing functionality

SYNOPSIS

  use Biblio::DocParser::Standard;
  use Biblio::DocParser::Utils;
  # First read a file into an array of lines.
  my $content = Biblio::DocParser::Utils::get_content("http://www.foo.com/myfile.pdf");
  my $doc_parser = new Biblio::DocParser::Standard();
  my @references = $doc_parser->parse($content);
  # Print a list of the extracted references.
  foreach(@references) { print "-> $_\n"; } 

DESCRIPTION

Biblio::DocParser::Standard provides a fairly simple implementation of a system to extract references from documents.

Various styles of reference are supported, including numeric and indented, and documents with two columns are converted into single-column documents prior to parsing. This is a very experimental module, and still contains a few hard-coded constants that can probably be improved upon.

METHODS

$parser = Biblio::DocParser::Standard->new()

The new() method creates a new parser instance.

@references = $parser->parse($lines, [%options])

The parse() method takes a string as input (see the get_content() function in Biblio::DocParser::Utils for a way to obtain this), and returns a list of references in plain text suitable for passing to a CiteParser module.

CHANGES

- 2003/05/13 Removed Perl warnings generated from parse() by adding checks on the regexps

AUTHOR

Mike Jewell <moj@ecs.soton.ac.uk> Tim Brody <tdb01r@ecs.soton.ac.uk>