TabularExport
Synopsis
Writes the corpus data structure in files in tabular format.
Description
TabularExport evaluates files as a list of elements with the corpus as the context element and creates a file for each result. The file is located in outDir and named after the result of fileName (evaluated as a string).
If corpusFile is set, then it overrides files and fileName . The whole corpus goes into a single file.
The file is a table where each line is the result of the evaluation of lines as a list of element with the file element as the context element. Each line will have as many columns as the size of the columns array.
Each expression of columns is evaluated as a string with the line element as the context element.
Snippet
<tabularexport class="TabularExport">
<columns></columns>
<lines></lines>
<outDir></outDir>
</tabularexport>
Mandatory parameters
columns
Expressions that specify the contents of each column.
lines
Expression that specifies which element corresponds to each line.
outDir
Directory where files are written.
Optional parameters
corpusFile
Path to a single file for the whole corpus. This parameter will override both files and fileName .
fileName
Name of the file.
files
Expression that specifies which element corresponds to each file.
footers
Last line of output files.
headers
First line of output files.
append
Either to append the export at the end of a file, if the file exists.
charset
Character encoding of the written files.
separator
Character that separates columns.
trim
trueCSV
Use CSV Commons library for the output.