View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ted Pedersen > Text-NSP >


Annotate this POD


Open  0
View/Report Bugs

NAME ^ - Sort output from or in descending order based on frequency or association score


Sorts a given trigram file in the descending order of the trigram scores.



Required Arguments:


Should be a trigram input file to be sorted. A TRIGRAM file created by or is already sorted in the descending order of the trigram scores. A TRIGRAM output of or 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'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's --remove option.

Other Options :


Displays this message.


Displays the version information.

OUTPUT ^ shows given TRIGRAMs in the descending order of their counts/ scores.


Amruta Purandare, Ted Pedersen. University of Minnesota at Duluth.


Copyright (c) 2004,

Amruta Purandare, University of Minnesota, Duluth.

Ted Pedersen, University of Minnesota, Duluth.

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.

syntax highlighting: