Your social network data might contain reactions from your customers. To do some basic classification, following transformation script can be used:
if (indexOfAny(value('L_ATTRIBUTE_CODE'), 'PositiveKeyword1', 'PositiveKeyword2') != -1) { return "Positive" } if (indexOfAny(value('L_ATTRIBUTE_CODE'), 'NegativeKeyword1', 'NegativeKeyword2') != -1) { return "Negative" } |
It is not recommended to use this transformation script on the same attribute you are analysing as the analysed text strings would be replaced by classifiers. |