public class ExpandTextFrequency extends ExecutableOperator implements RecordPipelineOperator
Constructor and Description |
---|
ExpandTextFrequency()
Default constructor.
|
ExpandTextFrequency(String inputField)
Constructor specifying the input field containing the frequency map.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeMetadata(StreamingMetadataContext ctx)
Implementations must adhere to the following contracts
|
protected void |
execute(ExecutionContext ctx)
Executes the operator.
|
String |
getFreqOutputField()
Get the output field to expand the frequency list into.
|
RecordPort |
getInput()
Get the input port of this operator.
|
String |
getInputField()
Get the frequency map field to expand.
|
RecordPort |
getOutput()
Get the output port of this operator.
|
boolean |
getRelative()
Get whether absolute or relative frequencies will be expanded.
|
String |
getTextOutputField()
Get the output field to expand the text list into.
|
void |
setFreqOutputField(String freqOutputField)
Set the output field to expand the frequency list into.
|
void |
setInputField(String inputField)
Set the frequency map field to expand.
|
void |
setRelative(boolean relative)
Set whether absolute or relative frequencies will be expanded.
|
void |
setTextOutputField(String textOutputField)
Set the output field to expand the text list into.
|
cloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutput
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public ExpandTextFrequency()
setInputField(String)
to set the names of the frequency map input field.public ExpandTextFrequency(String inputField)
inputField
- name of the text field to expandpublic void setInputField(String inputField)
If this field does not exist in the input, or is not of type WordMap or NGramMap, an exception will be thrown at composition time.
inputField
- name of the text field to expandpublic String getInputField()
public void setTextOutputField(String textOutputField)
textOutputField
- name of the string output fieldpublic String getTextOutputField()
public void setFreqOutputField(String freqOutputField)
freqOutputField
- name of the double output fieldpublic String getFreqOutputField()
public void setRelative(boolean relative)
relative
- true if relative frequencies will be outputpublic boolean getRelative()
public RecordPort getInput()
getInput
in interface PipelineOperator<RecordPort>
public RecordPort getOutput()
getOutput
in interface PipelineOperator<RecordPort>
protected void computeMetadata(StreamingMetadataContext ctx)
StreamingOperator
StreamingMetadataContext.parallelize(ParallelismStrategy)
.
RecordPort#setRequiredDataOrdering
, otherwise data may arrive in any order.
RecordPort#setRequiredDataDistribution
, otherwise data will arrive in an unspecified partial distribution
.
RecordPort#getSourceDataDistribution
and RecordPort#getSourceDataOrdering
. These should be
viewed as a hints to help chose a more efficient algorithm. In such cases, though, operators must
still declare data ordering and data distribution requirements; otherwise there is no guarantee that
data will arrive sorted/distributed as required.
RecordPort#setType
.RecordPort#setOutputDataOrdering
RecordPort#setOutputDataDistribution
AbstractModelPort#setMergeHandler
.MergeModel
is a convenient, re-usable model reducer, parameterized with
a merge-handler.
SimpleModelPort
's have no associated metadata and therefore there is
never any output metadata to declare. PMMLPort
's, on the other hand,
do have associated metadata. For all PMMLPorts, implementations must declare
the following:
PMMLPort.setPMMLModelSpec
.
computeMetadata
in class StreamingOperator
ctx
- the contextprotected void execute(ExecutionContext ctx)
ExecutableOperator
execute
in class ExecutableOperator
ctx
- context in which to lookup physical ports bound to logical portsCopyright © 2020 Actian Corporation. All rights reserved.