mm2plain.pl
Converts a given file from .mm format into plain text format.
This program takes as input a plain text. Each line of the plain text files contains a single context. We defined plain text to be an instance whose context is on a single line and the target word is tagged with its instance id and sense, for example:
<head item=``art'' instance=``art.402'' sense=``art_gallery''>art</head> gallery and Town Hall or in a park.
This is converted into .mm format. For more information please see README.format.mm.
mm2plain.pl [OPTIONS] MM
Input file in .mm format that is to be converted into plain text format.
Creates an optional key file.
Each line in KEYFILE should show the instance id and optional
sense tags of the instance displayed on the corresponding line
in the TEXT file, in the format -
<instance id=\"IID\"\/> [<sense id=\"SID\"\/>]*
where an <instance> tag is followed by zero or more <sense> tags.
Prints the sense information for the target word in tags
in the output. For example:
<head item="target word" instance="instanceid" sense="sense">word</head>
=head3 --cui
Prints out the Concept Unique Identifiers of the words in
the instance as the plain text rather than the words
themselves.
Prints out the English form of the Concept Unique Identifiers
of the words in the instance as the plain text rather than
the words themselves.
Prints out the semantic types of the Concept Unique Identifiers
of the words in the instance as the plain text rather than
the words themselves.
Displays the summary of command line options.
Displays the version information.
mm2plain displays the given .mm file in plain text format with the contextual data of each instance on a separate line. Specifically, each i'th line displayed on STDOUT shows the context of the i'th instance in the given .mm file.
In plain format each line of the text files contains a single context. where the ambiguous word is identified by:
<head item=``target word'' instance=``instance'' sense=``sense''>word</head>.
For example:
Paul was named <head item=``art'' instance=``art.30002'' sense=``art''>Art</head> magazine's top collector.
See README.mm.format
Bridget McInnes, University of Minnesota, Twin Cities
Ted Pedersen, University of Minnesota, Duluth
Copyright (c) 2002-2008,
Ted Pedersen, University of Minnesota, Duluth. tpederse at umn.edu
Bridget McInnes, University of Minnesota, Twin Cities bthomson at cs.umn.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.