AlvisNLP

corpus processing engine

JsonExport

Synopsis

Writes the corpus data structure as a JSON file.

This module is experimental.

Description

JsonExport 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.

Each file is a JSON file with a structure specified by json .

Snippet

<jsonexport class="JsonExport">
    <json></json>
    <outDir></outDir>
</jsonexport>

Mandatory parameters

json

Mandatory
Type: JsonValue

JSON value specification.

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.

Deprecated parameters