NAME
sort-trigrams.pl - Sort output from count.pl or statistic.pl in descending order based on frequency or association score
SYNOPSIS
Sorts a given trigram file in the descending order of the trigram scores.
USGAE
sort-trigrams.pl [OPTIONS] TRIGRAM
INPUT
Required Arguments:
TRIGRAM
Should be a trigram input file to be sorted. A TRIGRAM file created by count.pl or statistic.pl is already sorted in the descending order of the trigram scores. A TRIGRAM output of combig.pl or huge-combine.pl is however un-sorted and could be sorted using this program.
All lines in TRIGRAM file should be formatted as -
word1<>word2<>word3<>n111 n1pp np1p npp1 n11p n1p1 np11
Or as -
word1<>word2<>word3<>rank score n111 n1pp np1p npp1 n11p n1p1 np11
Optional Arguments:
--frequency F
Trigrams with counts/scores less than F will not be displayed. The ignored trigrams are however not removed from the sample and their counts are still counted in the total trigrams and in the marginal word frequencies. In other words, the behavior of this option is like count.pl's --frequency option.
--remove L
Trigrams with counts/scores less than L are completely removed from the sample. Their counts do not affect any marginal totals. In other words, this option has the same effect as count.pl's --remove option.
Other Options :
--help
Displays this message.
--version
Displays the version information.
OUTPUT
sort-trigrams.pl shows given TRIGRAMs in the descending order of their counts/ scores.
AUTHOR
Amruta Purandare, Ted Pedersen. University of Minnesota at Duluth.
COPYRIGHT
Copyright (c) 2004,
Amruta Purandare, University of Minnesota, Duluth. pura0010@umn.edu
Ted Pedersen, University of Minnesota, Duluth. tpederse@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.