AggregateValues
Synopsis
AggregateValues lists a set of values and computes aggregate values.
Description
AggregateValues lists a set of elements specified by entries , and computes a string value for each specified by key . AggregateValues computes aggregates functions specified by aggregators for each distinct value. The list of entry keys and their aggregate values are written into outFile
ExampleCounting words in the corpus:
<word-count class="AggregateValues">
<entries>documents.sections.layer:words</entries>
<key>@form</key>
<aggregators>
<count/>
</aggregators>
<outFile>word-count.txt</outFile>
</word-count>
Snippet
<aggregatevalues class="AggregateValues">
<entries></entries>
<key></key>
<outFile></outFile>
</aggregatevalues>
Mandatory parameters
entries
Mandatory
Type: Expression
Expression evaluated from the corpus as a list of elements.
key
Mandatory
Type: Expression
Value of each entry. This expression is evaluated as a string from the entry element.
outFile
Mandatory
Type: TargetStream
File where to write the result.
Optional parameters
aggregators
Default value: ``
Type: Aggregator[]
Aggregate functions to compute for each value.
separator
Default value: ` `
Type: Character
Character that separates columns in the result file.