NAME
MARC::Detrans - De-transliterate text and MARC records
SYNOPSIS
use MARC::Batch;
use MARC::Detrans;
my $batch = MARC::Batch->new( 'marc.dat' );
my $detrans = MARC::Detrans->new( 'config.xml' );
while ( my $record = $batch->next() ) {
my $newRecord = $detrans->convert( $record );
}
DESCRIPTION
MARC::Detrans is an eclectic addition to the already eclectic MARC::Record distribution for de-transliterating MARC::Records. What is detransliteration you ask? As you might have guessed it's the opposite of transliteration, which according to the Merriam-Webster:
to represent or spell in the characters of another alphabet
Traditionally when librarians catalog an item that has a title in a non-Roman script they will follow transliteration rules for converting the title into the Roman alphabet, so that the bibliographic record could be filed into the card catalog or database index appropriately. These Romanization Rules are published by the Library of Congress http://www.loc.gov/catdir/cpso/roman.html.
Now that computer screens can display Unicode fairly well it is now desirable to display the original script for library users who are more familiar with the original script. MARC::Detrans provides a framework for detransliterating MARC records so that the orginal script is available MARC-8 encoded in 880 fields. Very esoteric right?
CONFIGURATION
MARC::Detrans behavior is controlled by an XML configuration file. An example of this configuration file can be found in the examples directory of the MARC::Detrans distribution. The configuration determines the detransliteration rules that will be used to add 880 fields to existing records. It is hoped that people will constribute their configurations for various languages to the MARC::Detrans project so that they can be distributed with this package. For more information about the configuration file see MARC::Detrans::Config.
In addition a sample driver program which uses MARC::Detrans has also been included in the examples directory. This script is meant as a jumping off point showing how to use the MARC::Detrans framework.
METHODS
new()
The constructor which you should pass the path to your configuration file.
my $detrans = MARC::Detrans->new( config => 'config.xml' );
convert()
Pass a MARC::Record into convert() and you will be returned a new MARC::Record with portions of it modified according to your configuration file.
IMPORTANT: you'll probably want to call errors() afterwards to see if there were any problems during the conversion.
errors()
Will return the latest errors encountered during a call to convert(). Can be useful for determining why a call to convert() returned undef. A side effect of calling errors() is that the errors storage is reset.
AUTHORS
MARC::Detrans was developed as part of a project funded by the Queens Borough Public Library in New York City under the direction of Jane Jacobs.
Ed Summers <ehs@pobox.com>