Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: rboccuzziMike, assuming Mark got your answer correct (looks like how I would have interpreted it as well, so hopefully he did), the only "tweak" I would give, in the form of "typing optimization", is changing the BRAINscript on the second node to look more like this (after the if/else if stuff):
emit *, ruleMatch
output "rule1" where ruleMatch == 1
output "rule2" where ruleMatch == 2
output "rule3" where ruleMatch == 3
output "other" where ruleMatch == -1
This will run the same as the graph Mark attached, but might be a bit easier for you to read/type. In this version, the first emit comes before any output statement, so it is a default for all outputs. For the following outputs, you can either say
output "rule1" {
where ruleMatch == 1
}
or replace it with a one line, since it is a single where statement as
output "rule1" where ruleMatch == 1
Cheers
Rich