org.knowceans.corpus.analysis
Class CorpusStatistics

java.lang.Object
  extended by org.knowceans.corpus.analysis.CorpusStatistics
Direct Known Subclasses:
AmqCorpusStatistics

public class CorpusStatistics
extends java.lang.Object

CorpusStatistics prints some statistics about a TermCorpus to stdout.

Author:
heinrich

Field Summary
(package private)  TermCorpus c
           
(package private)  double[] docFreqs
           
(package private) static java.io.PrintStream out
           
(package private)  double[] termFreqs
           
(package private)  double[] ulengths
           
(package private)  double[] wlengths
           
 
Constructor Summary
CorpusStatistics(TermCorpus corp)
          Show tern statistics (Histogram of term frequencies)
 
Method Summary
static void main(java.lang.String[] args)
          this is the driver for Dpa statistics
 void showCorpusStats()
          Show corpus statistics (Size of corpus, mean document size etc.)
 void showDocStats()
          Show document statistics (Histogram of term frequencies per document)
 void showTermStats()
           
 double[] stats(double[] x)
          statistics of a double vector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

TermCorpus c

wlengths

double[] wlengths

ulengths

double[] ulengths

termFreqs

double[] termFreqs

docFreqs

double[] docFreqs

out

static java.io.PrintStream out
Constructor Detail

CorpusStatistics

public CorpusStatistics(TermCorpus corp)
Show tern statistics (Histogram of term frequencies)

Method Detail

main

public static void main(java.lang.String[] args)
this is the driver for Dpa statistics

Parameters:
args -

showCorpusStats

public void showCorpusStats()
Show corpus statistics (Size of corpus, mean document size etc.)


showDocStats

public void showDocStats()
Show document statistics (Histogram of term frequencies per document)


showTermStats

public void showTermStats()

stats

public double[] stats(double[] x)
statistics of a double vector

Returns:
stats[0]=mean, stats[1]=stdev