Free cookie consent management tool by TermsFeed

a!sentimentScore() Function

The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply.

Function

a!sentimentScore( text )

Returns a list of scores representing the emotional or subjective sentiment expressed in each of the provided text values, ranging from 1.0 (positive) to -1.0 (negative).

Parameters

Keyword Type Description

text

List of Text String

The text values from which to extract sentiment scores. For best results, use values that are about the length of a sentence.

Returns

List of Decimal

Usage considerations

Considerations for Appian Cloud users

Note:  Attention Appian Cloud FedRAMP, HIPAA, or PCI-DSS customers: Use of the Sentiment Score function results in sending data outside of Appian Cloud's FedRAMP, HIPAA, or PCI-DSS in-scope service boundaries. Customers should use caution when using a!sentimentScore() with regulated data, and review for their own compliance requirements.

This function is available only on Appian Cloud and will be enabled on Cloud sites on a rolling basis. You will receive the following error until your site is enabled: This function is currently unavailable. Please contact your system administrator if this problem persists.

Supported text values

  • Supports US English text only.

  • Single large text values will typically not provide useful sentiment scores. For best results, split large values into a list of smaller values that are each about the length of a sentence.

Examples

You can copy and paste these examples into the Expression Rule Designer to see how this works.

Positive sentiment score

1
=a!sentimentScore({"Hi, I hope you're having a great day"})

returns

  {0.79}

Negative sentiment score

1
=a!sentimentScore({"I got the wrong shipment!"})

returns

	{-0.53}

Returning sentiment scores for multiple statements at once

1
2
3
4
5
6
=a!sentimentScore(
  {
    "I lost my wallet and was having a horrible day!",
    "Then someone returned it to me and I was so happy!"
  }
)

returns

  {-0.73, 0.72}

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Partially compatible

Can be used with Appian Portals if it is connected using an integration and web API.

Offline Mobile Compatible
Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible
Process Reports Incompatible

You cannot use this function to configure a process report.

Process Events Incompatible

You cannot use this function to configure a process event node, such as a start event or timer event.

Feedback