Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

Your social network data might contain reactions from your customers. To do some basic classification, following transformation script can be used:


Code Block
languagegroovy
if (indexOfAny(value('L_ATTRIBUTE_CODE'), 'PositiveKeyword1', 'PositiveKeyword2') != -1)

{

  return "Positive"

}

if (indexOfAny(value('L_ATTRIBUTE_CODE'), 'NegativeKeyword1', 'NegativeKeyword2') != -1)

{

  return "Negative"

}


Note

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.






Sv translation
languageja

ソーシャルネットワークのデータは、顧客からの反応が含まれる場合があります。いくつかの基本的な分類を行うには、次の変換スクリプトを使用できます:


Code Block
languagegroovy
if (indexOfAny(value('L_ATTRIBUTE_CODE'), 'PositiveKeyword1', 'PositiveKeyword2') != -1)

{

  return "Positive"

}

if (indexOfAny(value('L_ATTRIBUTE_CODE'), 'NegativeKeyword1', 'NegativeKeyword2') != -1)

{

  return "Negative"

}


Note

分析されたテキスト文字列は、分類によって置換されるので、分析するのと同じ属性でこの変換スクリプトを使用することは推奨されません。


    • 'L_ATTRIBUTE_CODE' は解析したい属性のコードであります。
    • キーワードは、エイミーが満たされたときに(この例で「ポジティブ」または「ネガティブ」で)指定された分類器を返却し、文字列値の条件を表示します。
    • キーワードのより高い数は一致を見つけるのに成功率を上昇させます。