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.
- 'L_ATTRIBUTE_CODE' is code of the attribute you want to analyse.
- Keywords represent string values' conditions which, when any met, return the specified classifier (in this example "Positive" or "Negative").
- Higher number of keywords raises the success rate of finding a match.
Overview
Content Tools