CalcCountOfCounts.cpp

Go to the documentation of this file.
00001 
00002 #include "_SuffixArrayScanningBase.h"
00003 #include "stdio.h"
00004 #include "stdlib.h"
00005 #include <iostream>
00006 #include <fstream>
00007 #include <map>
00008 
00009 using namespace std;
00010 
00016 int main(int argc, char * argv[]){
00017         //-----------------------------------------------------------------------------
00018         //check parameter
00019         //-----------------------------------------------------------------------------
00020         if(argc<4){
00021                 fprintf(stderr,"\nGiven an indexed corpus, output the count of counts for n-grams.\n");
00022                 fprintf(stderr,"\nUsage:\n");
00023                 fprintf(stderr,"\n%s fileNameStem maxN maxFreq\n\n",argv[0]);           
00024                 exit(0);
00025         }
00026         
00027         unsigned int maxN = atoi(argv[2]);
00028         unsigned int maxFreq = atoi(argv[3]);
00029 
00030         C_SuffixArrayScanningBase saObj(argv[1], maxN); 
00031         saObj.scanSuffixArrayForCountofCounts(maxFreq);
00032 
00033         return 1;
00034 }

Generated on Fri Jul 6 23:11:09 2007 for SALM by  doxygen 1.5.1