AlvisNLP

corpus processing engine

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

Mandatory

Expressions that specify the contents of each column.

lines

Mandatory
Type: Expression

Expression that specifies which element corresponds to each line.

outDir

Mandatory

Directory where files are written.

Optional parameters

corpusFile

Optional
Type: File

Path to a single file for the whole corpus. This parameter will override both files and fileName .

fileName

Optional
Type: Expression

Name of the file.

files

Optional
Type: Expression

Expression that specifies which element corresponds to each file.

footers

Optional

Last line of output files.

headers

Optional

First line of output files.

append

Default value: `false`
Type: Boolean

Either to append the export at the end of a file, if the file exists.

charset

Default value: `UTF-8`
Type: String

Character encoding of the written files.

separator

Default value: ` `
Type: String

Character that separates columns.

trim

Default value: `false`
Type: Boolean

trueCSV

Default value: `false`
Type: Boolean

Use CSV Commons library for the output.

Deprecated parameters