|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.console.summaryGenericEvaluator
public class summaryGenericEvaluator
A generic class for summary evaluation, which can host many different methods, through a single interface.
Field Summary | |
---|---|
protected java.lang.String |
ComparatorClass
|
protected java.lang.Integer |
Dist
|
protected java.lang.String |
DocumentClass
|
protected java.util.Hashtable |
hModelCache
|
protected java.util.Hashtable |
hNModelCache
|
protected java.lang.String |
ModelDir
|
protected java.lang.Integer |
NMax
|
protected java.lang.Integer |
NMin
|
protected java.lang.String |
OutFile
|
protected java.util.concurrent.Semaphore |
OutputSemaphore
|
protected boolean |
Progress
|
protected boolean |
Silent
|
protected java.lang.String |
SummaryDir
|
protected java.lang.Integer |
Threads
|
Constructor Summary | |
---|---|
summaryGenericEvaluator(java.util.concurrent.Semaphore sOutputSemaphore,
int iNMin,
int iNMax,
int iDist,
int iThreads,
java.lang.String sOutFile,
java.lang.String sSummaryDir,
java.lang.String sModelDir,
java.lang.String sDocumentClass,
java.lang.String sComparatorClass,
boolean bSilent,
boolean bProgress)
Creates a summaryGenericEvaluator, given a document class name, a comparator class name and a set of parameters indicating how to perform the evaluation. |
|
summaryGenericEvaluator(java.lang.String[] args)
Creates a new instance of summaryEvaluator, given an array of command-line like parameters. |
Method Summary | |
---|---|
protected SimilarityArray |
calcSimilarityMeasures(CategorizedFileEntry cfeCur,
java.util.List dsModelSet,
boolean bOutput,
java.io.PrintStream pOut,
java.util.concurrent.Semaphore sSem,
java.lang.String sDocumentClass,
java.lang.String sEvaluatorClass,
int NGramSize_Min,
int NGramSize_Max,
int Dmax,
boolean bSilent)
Calculates similarity measures between a file entry and a set of model documents. |
protected SimilarityArray |
calcSimilarityMeasures(CategorizedFileEntry cfeCur,
java.util.List dsModelSet,
boolean bOutput,
java.util.concurrent.Semaphore sSem)
Calculates similarity measures between a file entry and a set of model documents, using default representation ( NGramDocument )
and default comparator (StandardDocumentComparator ) classes. |
protected void |
doOptimizedEval(java.util.concurrent.Semaphore sSem,
java.io.PrintStream pOverallResultsOutStream,
int NGramSize_Min,
int NGramSize_Max,
int Dmax,
java.lang.String sSummaryDir,
java.lang.String sModelDir,
int iThreads,
java.lang.String DocumentClass,
java.lang.String ComparatorClass,
boolean bSilent,
boolean bProgress)
Performs optimized evaluation of the documents in given dirs, given a document and a comparator class name, as well as a set of evaluation parameters. |
protected int |
getConstructor(java.lang.String sClassName,
int iParams)
Returns the index of the constructor of a class, given its parameter count. |
static void |
main(java.lang.String[] args)
|
void |
run()
Executor of the evaluation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Integer NMin
protected java.lang.Integer NMax
protected java.lang.Integer Dist
protected java.lang.Integer Threads
protected java.lang.String OutFile
protected java.lang.String SummaryDir
protected java.lang.String ModelDir
protected java.lang.String DocumentClass
protected java.lang.String ComparatorClass
protected boolean Silent
protected boolean Progress
protected java.util.concurrent.Semaphore OutputSemaphore
protected java.util.Hashtable hModelCache
protected java.util.Hashtable hNModelCache
Constructor Detail |
---|
public summaryGenericEvaluator(java.lang.String[] args)
public summaryGenericEvaluator(java.util.concurrent.Semaphore sOutputSemaphore, int iNMin, int iNMax, int iDist, int iThreads, java.lang.String sOutFile, java.lang.String sSummaryDir, java.lang.String sModelDir, java.lang.String sDocumentClass, java.lang.String sComparatorClass, boolean bSilent, boolean bProgress)
ILoadableTextPrint
, while the
comparator can be any offspring of SimilarityComparatorListener
.
ILoadableTextPrint
,
SimilarityComparatorListener
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- the command line argumentsprotected void doOptimizedEval(java.util.concurrent.Semaphore sSem, java.io.PrintStream pOverallResultsOutStream, int NGramSize_Min, int NGramSize_Max, int Dmax, java.lang.String sSummaryDir, java.lang.String sModelDir, int iThreads, java.lang.String DocumentClass, java.lang.String ComparatorClass, boolean bSilent, boolean bProgress)
sSem
- A semaphore that ensures that the output is provided consistently.pOverallResultsOutStream
- The output stream for results.NGramSize_Min
- The min n-gram rank to take into account, if applicable to the method.NGramSize_Max
- The max n-gram rank to take into account, if applicable to the method.Dmax
- The n-gram neighbourhood distance to use, if applicable to the method.sSummaryDir
- The peer summary base directory.sModelDir
- The model summaries base directory.iThreads
- The umber of threads to use for parallel computation.DocumentClass
- The dodcment class by which to represent texts.ComparatorClass
- The comparator class to use for the evaluation.bSilent
- If true, no debug messages are output.bProgress
- If true, indicates that progress indication should be output, even in silent
mode.public void run()
protected SimilarityArray calcSimilarityMeasures(CategorizedFileEntry cfeCur, java.util.List dsModelSet, boolean bOutput, java.util.concurrent.Semaphore sSem)
NGramDocument
)
and default comparator (StandardDocumentComparator
) classes.
protected SimilarityArray calcSimilarityMeasures(CategorizedFileEntry cfeCur, java.util.List dsModelSet, boolean bOutput, java.io.PrintStream pOut, java.util.concurrent.Semaphore sSem, java.lang.String sDocumentClass, java.lang.String sEvaluatorClass, int NGramSize_Min, int NGramSize_Max, int Dmax, boolean bSilent)
cfeCur
- The file entry to compare to models.dsModelSet
- The set of models to compare against.bOutput
- If true verbose output is selected.pOut
- The output stream for results.sSem
- The semaphore that assures consistent output.sDocumentClass
- The name of the document class to represent
documents by. Should inherit from ILoadableTextPrint
.sEvaluatorClass
- The name of the evaluator class to use.
Should inherit from SimilarityComparatorListener.NGramSize_Min
- The min n-gram rank to use.NGramSize_Max
- The max n-gram rank to use.bSilent
- If true, minimal debug output is given.
protected int getConstructor(java.lang.String sClassName, int iParams)
sClassName
- The class name of interest.iParams
- The parameter count to look for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |