SentimentAnalyzers

AnalyzeSentence

The AnalyzeSentence component enables users to input text-based complaints or comments allowing the analyzer component understanding the sentence to display the score of positivity, neutral and negative sentiment.

Screenshot

Ports

The AnalyzeSentence Component exposes the Control In, Control Out, Data In and Data Out ports by default.

Port Description
Control In Must be connected to the Control Out port of one or more components.
Control Out Must be connected to the Control In port of any other component.
Data Out Data out ports returns the integer value.
Data In Specifies the text to be entered in application (String).

Properties

To edit the properties of the AnalyzeSentence in the properties window, change the required property. User can edit the following properties-

Property Description
Search Searches for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the action is performed.
Delay Before Execution Specifies the wait time (in seconds) before the action is performed.

Example

Let us consider an example- Screenshot

  1. In the toolbox, expand the Cognitive Category.

  2. The user has to expand the SentimentAnalyzers, drag the AnalyzeSentence component and drop on Design Surface.

  3. Double-click on Text and input the sentence which the user wants to analyse.

  4. Expand the General category, Drag the Format Text and Drop on design surface.

  5. Click on add ‘+’ icon of format text to add the data in port dynamically, (in this example 4 new parameters are added).

  6. Double-click on Format text then Text Format Editor Window will open.

  7. On the Text Format Editor window, the user has to write the format as required.

    Screenshot

  8. Click on Ok.

  9. Expand the Message box component, Drag the show & drop it on the Design Surface.

  10. Connect the control ports and data ports in the activity.

  11. In the toolbar, click Run.

Output:

Screenshot