classify - Tag records by a tree of rules
A record stream.
The input stream plus a field with a tag.
This tool will allow you to tag each record by applying a tree of simple rules on each record, like this:
Each rule of the tree will evaluate to either true or false.
The tool will then continue down the path of the truth value.
It may then meet another rule, or a tag. If a tag is met, then it is done; else it will go back to 1.
A single rule is made up of a field name, an operator, and a value. The field name is the name of a field in the input, the operator is the operation you want to apply, and the value is the parameter of the operation that has different meaning for each operator.
The following operators are available:
The value of the field needs to be exactly like the value of the rule to be true.
The value of the field needs to be less than the value of the rule to be true. This will work on both numericals and text.
The value of the field needs to be greater than the value of the rule to be true. This will work on both numericals and text.
The value of the field will need to be somewhat like the value of the rule. Somewhat meaning that the value of the rule will be treated as wildcard expression (see http://en.wikipedia.org/wiki/Wildcard_character), and be matched against the value of the field.
|
Note
|
Because of a configuration design a rule need always to be configured. A dummy rule has been inserted as a default rule; and you will get an error when you create the tool and connect another tool to it that does not provide the field host, before you have configured it. This is natural and should be ignored. |
The name of a new field added to the output containing the tags.
The field the current rule applies to.
The operator of the current rule.
The value of the current rule.
If this rule evaluates to true, tag it with this text.
If this rule evaluated to false, tag it with this text.