The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MeSH::Parser::ASCII - parser for the MeSH ASCII format

SYNOPSIS

        use MeSH::Parser::ASCII;
        
        # instantiate the parser
        my $parser = MeSH::Parser::ASCII->new( meshfile => 'd2010.bin' );
        
        # parse the file
        $parser->parse();
        
        # loop through all the headings
        while ( my ( $id, $heading ) = each %{ $parser->heading } ) {
                print $id . ' - ' . $heading->{label} . "\n";
                
                # list synonyms
                for my $synonym ( @{ $heading->{synonyms} } ) {
                        print "\t$synonym\n";
                }
                
                # list parents
                for my $parent ( @{ $heading->{parents} } ) {
                        print "\t" . $parent->{label} . "\n";
                }
        }

DESCRIPTION

Parser for the MeSH ASCII format.

meshfile

MeSH file in ASCII format

METHODS

parse()

Parses the MeSH file and loads it into a hash ref.

heading

Returns a hash ref collection of all the parsed headings. Each consists of a label, and id and synonyms if any were available.

Label is extracted from Mesh Heading field in Descriptor Data Elements, or Name of substance in Supplementary Concept Records, or Subheading in Qualifier Data Elements.

Synonyms are only parsed for Descriptor Data Elements (PRINT ENTRY and ENTRY entries)

AUTHOR

Tomasz Adamusiak <tomasz@cpan.org>

COPYRIGHT AND LICENSE

Copyright (c) 2010 European Bioinformatics Institute. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under GPLv3.

This software is provided "as is" without warranty of any kind.