-
Notifications
You must be signed in to change notification settings - Fork 6
module__AggregateValues
Robert Bossy edited this page Jul 27, 2017
·
1 revision
#org.bibliome.alvisnlp.modules.aggregate.AggregateValues
org.bibliome.alvisnlp.modules.aggregate.AggregateValues lists a set of values and computes aggregate values.
This module is experimental.
org.bibliome.alvisnlp.modules.aggregate.AggregateValues lists a set of elements specified by entries, and computes a string value for each specified by key. org.bibliome.alvisnlp.modules.aggregate.AggregateValues computes aggregates functions specified by aggregators for each distinct value. The list of entry keys and their aggregate values are written into outFile
Counting 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>
```
## Parameters
<a name="entries">
### entries
Optional
Type: [[Expression|converter__alvisnlp.corpus.expressions.Expression]]
Expression evaluated from the corpus as a list of elements.
<a name="key">
### key
Optional
Type: [[Expression|converter__alvisnlp.corpus.expressions.Expression]]
Value of each entry. This expression is evaluated as a string from the entry element.
<a name="outFile">
### outFile
Optional
Type: [[TargetStream|converter__org.bibliome.util.streams.TargetStream]]
File where to write the result.
<a name="aggregators">
### aggregators
Default value: ``
Type: [[Aggregator[]|converter__org.bibliome.alvisnlp.modules.aggregate.Aggregator[]]]
Aggregate functions to compute for each value.
<a name="separator">
### separator
Default value: ` `
Type: [[Character|converter__java.lang.Character]]
Character that separates columns in the result file.