Documentation ¶
Index ¶
- type CombinedResultsWriter
- type IndividualResultsWriter
- type ResultsWriter
- func NewClassificationResultsWriter(multiFileOut bool, outputFile, outputFormat string) (ResultsWriter, error)
- func NewExtractionResultsWriter(multiFileOut bool, outputFile, outputFormat string) (ResultsWriter, error)
- func NewReaderResultsWriter(multiFileOut bool, outputFile, outputFormat string) (ResultsWriter, error)
- func NewRedactResultsWriter(multiFileOut bool, outputFile string) (ResultsWriter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CombinedResultsWriter ¶
type CombinedResultsWriter struct {
// contains filtered or unexported fields
}
The CombinedResultsWriter writes all the results it is passed to a single resultSink (for either the console, or a single file), with appropriate header, record separators & footer provided by the specified resultsFormatter
func NewCombinedResultsWriter ¶
func NewCombinedResultsWriter(sink sinks.Sink, resultsFormatter formatters.ResultsFormatter) *CombinedResultsWriter
func (*CombinedResultsWriter) Finish ¶
func (c *CombinedResultsWriter) Finish() error
func (*CombinedResultsWriter) Start ¶
func (c *CombinedResultsWriter) Start() error
func (*CombinedResultsWriter) WriteResult ¶
func (c *CombinedResultsWriter) WriteResult(filename string, result interface{}) error
type IndividualResultsWriter ¶
type IndividualResultsWriter struct {
// contains filtered or unexported fields
}
The IndividualResultsWriter writes each results it is passed to a new resultSink (an extensionSwappingFileWriter), just using the WriteResult method provided by the formatter (no header, record separators or footer)
func NewIndividualResultsWriter ¶
func NewIndividualResultsWriter(writerFactory sinks.SinkFactory, resultsFormatter formatters.ResultsFormatter) *IndividualResultsWriter
func (*IndividualResultsWriter) Finish ¶
func (c *IndividualResultsWriter) Finish() error
func (*IndividualResultsWriter) Start ¶
func (c *IndividualResultsWriter) Start() error
func (*IndividualResultsWriter) WriteResult ¶
func (c *IndividualResultsWriter) WriteResult(filename string, result interface{}) error
type ResultsWriter ¶
type ResultsWriter interface { Start() error WriteResult(filename string, result interface{}) error Finish() error }
func NewClassificationResultsWriter ¶
func NewClassificationResultsWriter(multiFileOut bool, outputFile, outputFormat string) (ResultsWriter, error)
NewClassificationResultsWriter constructs a ResultsWriter configured for classification.
func NewExtractionResultsWriter ¶
func NewExtractionResultsWriter(multiFileOut bool, outputFile, outputFormat string) (ResultsWriter, error)
NewExtractionResultsWriter constructs a ResultsWriter configured for extraction.
func NewReaderResultsWriter ¶
func NewReaderResultsWriter(multiFileOut bool, outputFile, outputFormat string) (ResultsWriter, error)
NewReaderResultsWriter constructs a ResultsWriter configured for reading.
func NewRedactResultsWriter ¶
func NewRedactResultsWriter(multiFileOut bool, outputFile string) (ResultsWriter, error)
NewReaderResultsWriter constructs a ResultsWriter configured for reading.