FileMapper
Synopsis
Maps elements according to a tab-separated mapping file.
Description
FileMapper reads the tab-separated mapping file mappingFile and maps the elements specified by the expression target . The mapping key of the elements is specified by the expression form evaluated as a string with the element as the context. The key is mapped agains the column of mappingFile specified by keyColumn (starting at 0). Each feature in targetFeatures is set with the value of the corresponding column in the matched line.
Snippet
<filemapper class="FileMapper">
<form></form>
<mappingFile></mappingFile>
<target></target>
</filemapper>
Mandatory parameters
form
Expression evaluated as a string with the target element as context that specifies the target key.
mappingFile
Tab-separated file containing the dictionary.
target
Expression evaluated as a list of elements with the corpus as context that specify the elements to be mapped.
Optional parameters
targetFeatures
Name of the features where to store the columns of matched lines. Ignored if headerLine is set.
headerLine
Assumes the first line of the dictionary is a header, target feature names will be the column names read from the header.
ignoreCase
Either to match ignoring the case.
keyColumn
Index of the line key in mappingFile .
operator
Matching operator: either exact (default) or prefix.
separator
Separator character between columns in mappingFile .