Class LETOROutputFormat
- java.lang.Object
- 
- org.terrier.structures.outputformat.LETOROutputFormat
 
- 
- All Implemented Interfaces:
- OutputFormat
 - Direct Known Subclasses:
- Normalised2LETOROutputFormat,- NormalisedLETOROutputFormat
 
 public class LETOROutputFormat extends java.lang.Object implements OutputFormat Outputs a featured result set in the LETOR format. If the resultset is not featured, then only the score (and docid) are output as features. NB: This class uses Double.toString() to render document scores and feature values, as this canonical output is easier to obtain and more precise than %f without any decimal places noted. Moreover, it will not display unnecessary ending zeros.- Since:
- 4.0
- Author:
- Rodrygo Santos
- See Also:
- http://research.microsoft.com/en-us/um/beijing/projects/letor/
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleandisplay_docidsprotected booleandisplay_docnosprotected booleandisplay_scoresprotected booleanfeature_docidsprotected intfOffsetprotected java.util.HashSet<java.lang.String>seenQueriesprotected booleantest
 - 
Constructor SummaryConstructors Constructor Description LETOROutputFormat(Index index)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidprintHeader(java.io.PrintWriter pw, FeaturedResultSet rs)voidprintResults(java.io.PrintWriter pw, SearchRequest q, java.lang.String method, java.lang.String iteration, int numberOfResults)Outputs the results of query q to PrintWriter pw, described by the method, iteration, and the specified limit on the number of results (0 means no limit).- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.terrier.structures.outputformat.OutputFormatcontentType
 
- 
 
- 
- 
- 
Field Detail- 
seenQueriesprotected java.util.HashSet<java.lang.String> seenQueries 
 - 
testprotected boolean test 
 - 
display_scoresprotected boolean display_scores 
 - 
feature_docidsprotected boolean feature_docids 
 - 
display_docidsprotected boolean display_docids 
 - 
display_docnosprotected boolean display_docnos 
 - 
fOffsetprotected int fOffset 
 
- 
 - 
Constructor Detail- 
LETOROutputFormatpublic LETOROutputFormat(Index index) 
 
- 
 - 
Method Detail- 
printResultspublic void printResults(java.io.PrintWriter pw, SearchRequest q, java.lang.String method, java.lang.String iteration, int numberOfResults) throws java.io.IOExceptionDescription copied from interface:OutputFormatOutputs the results of query q to PrintWriter pw, described by the method, iteration, and the specified limit on the number of results (0 means no limit).- Specified by:
- printResultsin interface- OutputFormat
- Throws:
- java.io.IOException
 
 - 
printHeaderprotected void printHeader(java.io.PrintWriter pw, FeaturedResultSet rs)
 
- 
 
-