AlvisNLP

corpus processing engine

ElementMapper

Synopsis

Maps elements according to a collection of mapping elements.

Description

ElementMapper evaluates entries as a list of elements with the corpus as the context element. These elements represent the entries from which target elements are matched. key specifies the key of each entry, and values specifies the values of the entries. target specifies the mapped elements; the form is matched against the key of entries. If the target element matches, ElementMapper adds the features targetFeatures with the matched entry values.

Snippet

<elementmapper class="ElementMapper">
    <entries></entries>
    <form></form>
    <key></key>
    <target></target>
    <targetFeatures></targetFeatures>
    <values></values>
</elementmapper>

Mandatory parameters

entries

Mandatory
Type: Expression

Expression evaluated as a list of elements with the corpus as the context element. Each element represents an entry.

form

Mandatory
Type: Expression

Expression evaluated as a string with the target element as context that specifies the target key.

key

Mandatory
Type: Expression

Expression evaluated as a string with the entry element as the context. The result determines the entry key.

target

Mandatory
Type: Expression

Expression evaluated as a list of elements with the corpus as context that specify the elements to be mapped.

targetFeatures

Mandatory
Type: String[]

Name of the features where to store the values of matched entries.

values

Mandatory

Expressions evaluated as strings with the entry element as the context. The results specify the feature values of targets that match the entry key.

Optional parameters

ignoreCase

Default value: `false`
Type: Boolean

Either to match ignoring the case.

operator

Default value: `exact`

Matching operator: either exact (default) or prefix.

Deprecated parameters