MetaMap::DataStructure - provides a container for the information extracted from machine readable MetaMap mapped text.
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.
add synopsis
This package provides a Perl container package to for information extracted from MetaMap mapped text.
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.
This package provides a Perl containers for information extracted from MetaMap mapped text.
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();
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)
a reference to a Citation object
array reference containing references to Utterance objects
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithID('01234567'); my $orderedUtterances = $dataStructures->getOrderedUtterances($citation);
returns a list of ordered Tokens within a Citation. Tokens are ordered by their appearance within the input text, with titles preceding abstracts
array reference containing references to Token objects
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithID('01234567'); my $orderedTokens = $dataStructures->getOrderedTokens($citation);
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.
array reference containing references arrays containing references to Concept objects
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithID('01234567'); my $orderedConcepts = $dataStructures->getOrderedConcepts($citation);
returns a hash table containing all unique Concepts with unique CUIs within a citation.
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
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithID('01234567'); my $uniqueConcepts = $dataStructures->getUniqueConcepts($citation);
returns a Citation with the specified ID
string of the Citation ID
reference to a Citation object
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithId('01234567');
returns a list of ordered Mappings within a Citation. Mappings are ordered by their appearance within the input text, with titles preceding abstracts
array reference containing references to Mapping objects
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithId('01234567'); my $orderedMappings = $dataStructures->getOrderedMappings($citation);
returns 1 if a Citation contains a title Utterance (ID contains 'ti') else 0
boolean
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithId('01234567'); my $hasTitle = $dataStructures->hasTitle($citation);
returns 1 if a Citation contains an abstract Utterance (ID contains 'ab') else 0
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); my $citation = $dataStructures->getCitationWithId('01234567'); my $hasAbstract = $dataStructures->hasAbstract($citation);
updates MetaMap Data structures with the text of the input string
string of MetaMap Prolg Output containing an utterance, or list of utterances
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); $datastructures->createFromText($text);
updates MetaMap Data structures with the text of the input string, and gives the addition the ID provided
string of MetaMap Prolg Output containing an utterance, or list of utterances string ID of the utterance or list of utterances to add
use MetaMap::DataStructures; my $datastructures = MetaMap::DataStructures->new(); $datastructures->createFromTextWithID($text,'01234567');
Sam Henry <henryst@vcu.edu> Bridget T McInnes <btmcinnes@vcu.edu>
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.
To install MetaMap::DataStructures, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MetaMap::DataStructures
CPAN shell
perl -MCPAN -e shell install MetaMap::DataStructures
For more information on module installation, please visit the detailed CPAN module installation guide.