Usage.pod
Examples of how to use NSP.
These are some sample usages of NSP. While this is not intended to be an exhaustive treatment of the various features, it should give you some idea of some of the ways you can use NSP.
count.pl -help
rank.pl -help
statistic.pl -help
count.pl h.cnt h.txtcount all bigrams that occur 5 or more times and store counts in holmes1.out5 AND create a histogram of the bigram counts and store in h-5.hist
count.pl -frequency 5 -hist h-5.hist h-5.cnt h.txtexclude all bigrams made up two words from stop.txt
count.pl -stop stop.txt h-stop.cnt h.txtcount all bigrams that occur within a 4 word window AND use a stop list (this is especially useful to prevent bigrams caused by multiple occurrences of frequent words within the given window size (like 'and and' 'of of' etc.)
count.pl -stop stop.txt -window 4 h-stop-w5.cnt h.txt
statistic.pl -score 6.00 -frequency 5 ll.pm holmes1.ll h.cntcreate a list of bigrams ranked by fisher's exact test (left sided) that only allow scores of 0.90 or better
statistic.pl -score 0.90 leftFisher.pm h.fish h.cntcreate a list of the top 10 bigrams as ranked by the dice coefficient.
statistic.pl -rank 10 dice.pm h.dice h.cntcreate a formatted report where bigrams are ranked by pointwise mutual information values, reported to 4 digits of precision.
statistic.pl -format mi.pm -precision 4 h.report h.cnt
rank.pl -precision 3 mi ll h.mi-ll-rank h.cntcompare the ranked list of bigrams created by pointwise mutual information and the dice coefficient. make comparisons based on 5 digits of precision and compare only the top 10 bigrams selected by mutual information.
rank.pl -precision 5 -rank 10 mi dice h.mi-dice-rank h.cntcompare the ranked list of bigrams found by fisher's exact test and the dice coefficient. make comparisons based on 2 digits of precision and compare only those bigrams that score greater than 0.90 on fisher's exact test.
rank.pl -precision 5 -score 0.90 leftFisher dice h.fish-dice-rank h.cnt
Ted Pedersen, tpederse@d.umn.edu
Last update on 02/15/01 by TDP based on BSP v0.3.
home page: http://www.d.umn.edu/~tpederse/nsp.html
mailing list: http://groups.yahoo.com/group/ngram/
Copyright (C) 2000-2003 Ted Pedersen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
Note: a copy of the GNU Free Documentation License is available on the web at http://www.gnu.org/copyleft/fdl.html and is included in this distribution as FDL.txt.