NAME

MetaMap::DataStructure - provides a container for the information extracted from machine readable MetaMap mapped text.

DESCRIPTION

This package provides a container for the information extracted from machine readable MetaMap mapped text.

For more information please see the MetaMap::DataStructure.pm documentation.

SYNOPSIS

add synopsis

ABSTRACT

This package provides a Perl container package to for information extracted from MetaMap mapped text.

INSTALL

To install the module, run the following magic commands:

perl Makefile.PL
make
make test
make install

This will install the module in the standard location. You will, most probably, require root privileges to install in standard system directories. To install in a non-standard directory, specify a prefix during the 'perl Makefile.PL' stage as:

perl Makefile.PL PREFIX=/home/sam

It is possible to modify other parameters during installation. The details of these can be found in the ExtUtils::MakeMaker documentation. However, it is highly recommended not messing around with other parameters, unless you know what you're doing.

DESCRIPTION

This package provides a Perl containers for information extracted from MetaMap mapped text.

FUNCTION DESCRIPTIONS

getCitations

description:

returns a hash table of Citations of this DataStrucures object

input:

 None  
	 

output:

hashtable reference with Citation IDs as keys and Citation object references 
  as values

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citations = $datastructures->getCitations(); 

getOrderedUtterances

description:

returns an ordered list of Utterances contained by the Citation. Utterances
are ordered by title, abstract, then number in ascending order
(e.g. ti.000.1, ti.000.2, ab.000.1, ab.000.2, ab.000.3)

input:

 a reference to a Citation object
	 

output:

array reference containing references to Utterance objects

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithID('01234567');
my $orderedUtterances = $dataStructures->getOrderedUtterances($citation);

getOrderedTokens

description:

returns a list of ordered Tokens within a Citation. Tokens are ordered by 
their appearance within the input text, with titles preceding abstracts

input:

 a reference to a Citation object
	 

output:

array reference containing references to Token objects

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation =  $dataStructures->getCitationWithID('01234567');
my $orderedTokens = $dataStructures->getOrderedTokens($citation);

getOrderedConcepts

description:

returns a list of ordered sub-arrays containing Concepts within a Citation. 
Each sub-array contains one or more reference to Concept objects. Where 
multiple concept objects exist is because of ambiguities. The sub-arrays are
ordered by their Concept's appearance within the input text, with titles 
preceding abstracts. Think of this as sequentical CUIs where the second 
dimension is for when multiple CUIS map to the same Tokens due to ambiguity.

input:

 a reference to a Citation object
	 

output:

array reference containing references arrays containing references to Concept 
objects

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithID('01234567');
my $orderedConcepts = $dataStructures->getOrderedConcepts($citation);

getUniqueConcepts

description:

returns a hash table containing all unique Concepts with unique CUIs
within a citation.

input:

 a reference to a Citation object
	 

output:

hashtable reference with keys of CUI codes, and values of references to Concept
  objects. Where multiple concepts of the same CUI exist, the reference is to
  the last seen Concept object

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithID('01234567');
my $uniqueConcepts = $dataStructures->getUniqueConcepts($citation);

getCitationWithId

description:

returns a Citation with the specified ID

input:

 string of the Citation ID 
	 

output:

reference to a Citation object

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithId('01234567');

getOrderedMappings

description:

returns a list of ordered Mappings within a Citation. Mappings are ordered by 
their appearance within the input text, with titles preceding abstracts

input:

 a reference to a Citation object
	 

output:

array reference containing references to Mapping objects

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithId('01234567');
my $orderedMappings = $dataStructures->getOrderedMappings($citation);

hasTitle

description:

returns 1 if a Citation contains a title Utterance (ID contains 'ti') 
else 0

input:

 a reference to a Citation object
	 

output:

boolean

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithId('01234567');
my $hasTitle = $dataStructures->hasTitle($citation);

hasAbstract

description:

returns 1 if a Citation contains an abstract Utterance (ID contains 'ab') 
else 0

input:

 a reference to a Citation object
	 

output:

boolean

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
my $citation = $dataStructures->getCitationWithId('01234567');
my $hasAbstract = $dataStructures->hasAbstract($citation);

createFromText

description:

updates MetaMap Data structures with the text of the input string

input:

 string of MetaMap Prolg Output containing an utterance, or list of utterances
	 

output:

None

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
$datastructures->createFromText($text);

createFromTextWithId

description:

updates MetaMap Data structures with the text of the input string, and gives 
  the addition the ID provided

input:

 string of MetaMap Prolg Output containing an utterance, or list of utterances
 string ID of the utterance or list of utterances to add
	 

output:

None

example:

use MetaMap::DataStructures; 
my $datastructures = MetaMap::DataStructures->new(); 
$datastructures->createFromTextWithID($text,'01234567');

SEE ALSO

AUTHOR

Sam Henry <henryst@vcu.edu> Bridget T McInnes <btmcinnes@vcu.edu>

COPYRIGHT

Copyright (c) 2016
Sam Henry, Virginia Commonwealth University 
henryst at vcu.edu 

Bridget T. McInnes, Virginia Commonwealth University 
btmcinnes at vcu.edu 

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to

The Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA  02111-1307, USA.