Analyse sentiment process

lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 683   Unicorn

Dear all, 

 

There are nuggets in our community and it is an excellent idea to share them !

I allow my self to inaugurate this new "ideas section" with a fictive and experimental sentiment analysis process : 

 

Sentiment_Analysis.png

 

Let me explain this process and the associated results : 

 

1. Object : 

The goal of this study is to perform a sentiment analysis of 40 tweets including the keyword « Iphone ».

 

2. Tools : 

For this study, we will use « RapidMiner » 9.0 (Beta) and its extension « AYLIEN Text Analysis » 0.20.

 

3. RapidMiner's process : 

The RapidMiner’s process execute the following actions :

  • Recovery of tweets including the keyword « Iphone » using the Search Twitter operator.
  • Analysis of the sentiment of each tweet using the Analyze Sentiment operator of the AYLIEN extension. This operator determine the sentiment polarity of each tweet according to its content (negative, neutral, positive).
  • Creation of a words matrix using the Process Documents from Data. In this step, tweets are tokenized, stop-words are filtered, the words are filtered by lenght (we only retain words whose number of characters is greater than 4).
  • Aggregation of the words according to their sentiment polarity using the Aggregate operator inside a Loop Attribute subprocess.
  • Sort and filtering of the 5 top words for each sentiment polarity value (negative, neutral, positive) using Sort and Filter Example Range operators.

4. Results

4.1 Sentiment analysis

 


Sentiment_Analysis_5.png

We can see that for the 40 tweets :

  • 4 tweets are considered as « negative ».
  • 28 tweets are considered as « neutral ».
  • 8 tweets are considered as « positive ».

If we add the neutral and positive tweets, we can consider that 90 % of the tweets express an « overall positive » opinion of the Iphone.

 

4.2 Top words : 

 

We sorted and filtered the 5 top words for each sentiment polarity value :

 

Sentiment_Analysis_2.png

Sentiment_Analysis_3.png

Sentiment_Analysis_4.png

 

We can see that the words « Apple » and « Iphone » are in the 5 top words of the neutral and positive exprimed tweets.

 

5. Conclusions

 

After performing the sentiment analysis and the study of the 5 top words of each sentiment, we can conclude that the Tweeter members have an « overall positive » sentiment of the brand "Apple" and its flagship product the « Iphone ».

 

However we saw that in the most frequent words in the negative tweets are « word », « auto », « correctly », « corrects ». We can interpret that the Iphone’s users  are not totally satisfied of the auto-correction tool of the Apple’s smartphone.

So we recommend to Apple to work on the improvement of this tool and to update the firmware of the Iphone.

 

 

Beyond this challenge of "the best of the best", I hope that this process will inspire/help RapidMiner's users which have similar

problematics/tasks...

 

Best regards,

 

Lionel

 

NB : The process : 

<?xml version="1.0" encoding="UTF-8"?><process version="9.0.000-BETA">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="9.0.000-BETA" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="social_media:search_twitter" compatibility="9.0.000-BETA" expanded="true" height="68" name="Search Twitter" width="90" x="45" y="136">
<parameter key="connection" value="dkk"/>
<parameter key="query" value="iphone"/>
<parameter key="limit" value="40"/>
<parameter key="language" value="en"/>
</operator>
<operator activated="true" class="replace" compatibility="9.0.000-BETA" expanded="true" height="82" name="Replace" width="90" x="179" y="136">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Text"/>
<parameter key="replace_what" value="@|#"/>;
</operator>
<operator activated="true" class="select_attributes" compatibility="9.0.000-BETA" expanded="true" height="82" name="Select Attributes" width="90" x="313" y="136">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attributes" value="Text"/>
</operator>
<operator activated="true" class="com.aylien.textapi.rapidminer:aylien_sentiment" compatibility="0.2.000" expanded="true" height="68" name="Analyze Sentiment" width="90" x="447" y="136">
<parameter key="connection" value="Aylien_dkk"/>
<parameter key="input_attribute" value="Text"/>
</operator>
<operator activated="true" class="multiply" compatibility="9.0.000-BETA" expanded="true" height="103" name="Multiply (2)" width="90" x="581" y="136"/>
<operator activated="true" class="nominal_to_text" compatibility="9.0.000-BETA" expanded="true" height="82" name="Nominal to Text" width="90" x="715" y="136">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Text"/>
</operator>
<operator activated="true" class="text:process_document_from_data" compatibility="8.1.000" expanded="true" height="82" name="Process Documents from Data" width="90" x="916" y="136">
<parameter key="vector_creation" value="Term Occurrences"/>
<parameter key="keep_text" value="true"/>
<list key="specify_weights"/>
<process expanded="true">
<operator activated="true" class="text:tokenize" compatibility="8.1.000" expanded="true" height="68" name="Tokenize" width="90" x="313" y="34"/>
<operator activated="true" class="text:filter_stopwords_english" compatibility="8.1.000" expanded="true" height="68" name="Filter Stopwords (English)" width="90" x="447" y="34"/>
<operator activated="true" class="text:filter_by_length" compatibility="8.1.000" expanded="true" height="68" name="Filter Tokens (by Length)" width="90" x="581" y="34"/>
<connect from_port="document" to_op="Tokenize" to_port="document"/>
<connect from_op="Tokenize" from_port="document" to_op="Filter Stopwords (English)" to_port="document"/>
<connect from_op="Filter Stopwords (English)" from_port="document" to_op="Filter Tokens (by Length)" to_port="document"/>
<connect from_op="Filter Tokens (by Length)" from_port="document" to_port="document 1"/>
<portSpacing port="source_document" spacing="0"/>
<portSpacing port="sink_document 1" spacing="0"/>
<portSpacing port="sink_document 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="text:data_to_documents" compatibility="8.1.000" expanded="true" height="68" name="Data to Documents" width="90" x="1050" y="136">
<list key="specify_weights"/>
</operator>
<operator activated="true" class="text:documents_to_data" compatibility="8.1.000" expanded="true" height="82" name="Documents to Data" width="90" x="1184" y="136">
<parameter key="text_attribute" value="Category"/>
</operator>
<operator activated="true" class="concurrency:loop_attributes" compatibility="8.2.000" expanded="true" height="103" name="Loop Attributes" width="90" x="1318" y="136">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attribute" value="AMOLED"/>
<parameter key="attributes" value="Category|polarity_confidence|subjectivity|subjectivity_confidence|polarity|Id|text"/>
<parameter key="invert_selection" value="true"/>
<process expanded="true">
<operator activated="true" class="handle_exception" compatibility="9.0.000-BETA" expanded="true" height="82" name="Handle Exception" width="90" x="313" y="34">
<process expanded="true">
<operator activated="true" class="aggregate" compatibility="8.2.000" expanded="true" height="82" name="Aggregate" width="90" x="112" y="34">
<list key="aggregation_attributes">
<parameter key="%{loop_attribute}" value="sum"/>
</list>
<parameter key="group_by_attributes" value="polarity"/>
</operator>
<connect from_port="in 1" to_op="Aggregate" to_port="example set input"/>
<connect from_op="Aggregate" from_port="example set output" to_port="out 1"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
<process expanded="true">
<connect from_port="in 1" to_port="out 1"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="transpose" compatibility="9.0.000-BETA" expanded="true" height="82" name="Transpose" width="90" x="447" y="34"/>
<operator activated="true" class="rename_by_example_values" compatibility="9.0.000-BETA" expanded="true" height="82" name="Rename by Example Values" width="90" x="581" y="34"/>
<connect from_port="input 1" to_op="Handle Exception" to_port="in 1"/>
<connect from_op="Handle Exception" from_port="out 1" to_op="Transpose" to_port="example set input"/>
<connect from_op="Transpose" from_port="example set output" to_op="Rename by Example Values" to_port="example set input"/>
<connect from_op="Rename by Example Values" from_port="example set output" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="source_input 3" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
<portSpacing port="sink_output 3" spacing="0"/>
</process>
</operator>
<operator activated="true" class="append" compatibility="9.0.000-BETA" expanded="true" height="82" name="Append" width="90" x="1452" y="136"/>
<operator activated="true" class="parse_numbers" compatibility="9.0.000-BETA" expanded="true" height="82" name="Parse Numbers" width="90" x="1586" y="136">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attributes" value="positive|neutral|negative"/>
</operator>
<operator activated="true" class="multiply" compatibility="9.0.000-BETA" expanded="true" height="124" name="Multiply" width="90" x="1720" y="136"/>
<operator activated="true" class="sort" compatibility="9.0.000-BETA" expanded="true" height="82" name="Sort (3)" width="90" x="1854" y="238">
<parameter key="attribute_name" value="negative"/>
<parameter key="sorting_direction" value="decreasing"/>
</operator>
<operator activated="true" class="sort" compatibility="9.0.000-BETA" expanded="true" height="82" name="Sort (2)" width="90" x="1854" y="136">
<parameter key="attribute_name" value="neutral"/>
<parameter key="sorting_direction" value="decreasing"/>
</operator>
<operator activated="true" class="sort" compatibility="9.0.000-BETA" expanded="true" height="82" name="Sort" width="90" x="1854" y="34">
<parameter key="attribute_name" value="positive"/>
<parameter key="sorting_direction" value="decreasing"/>
</operator>
<operator activated="true" class="filter_example_range" compatibility="9.0.000-BETA" expanded="true" height="82" name="Negative" width="90" x="1988" y="238">
<parameter key="first_example" value="1"/>
<parameter key="last_example" value="5"/>
</operator>
<operator activated="true" class="filter_example_range" compatibility="9.0.000-BETA" expanded="true" height="82" name="Neutral" width="90" x="1988" y="136">
<parameter key="first_example" value="1"/>
<parameter key="last_example" value="5"/>
</operator>
<operator activated="true" class="filter_example_range" compatibility="9.0.000-BETA" expanded="true" height="82" name="Positive" width="90" x="1988" y="34">
<parameter key="first_example" value="1"/>
<parameter key="last_example" value="5"/>
</operator>
<connect from_op="Search Twitter" from_port="output" to_op="Replace" to_port="example set input"/>
<connect from_op="Replace" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
<connect from_op="Select Attributes" from_port="example set output" to_op="Analyze Sentiment" to_port="Example Set"/>
<connect from_op="Analyze Sentiment" from_port="Example Set" to_op="Multiply (2)" to_port="input"/>
<connect from_op="Multiply (2)" from_port="output 1" to_op="Nominal to Text" to_port="example set input"/>
<connect from_op="Multiply (2)" from_port="output 2" to_op="Loop Attributes" to_port="input 2"/>
<connect from_op="Nominal to Text" from_port="example set output" to_op="Process Documents from Data" to_port="example set"/>
<connect from_op="Process Documents from Data" from_port="example set" to_op="Data to Documents" to_port="example set"/>
<connect from_op="Data to Documents" from_port="documents" to_op="Documents to Data" to_port="documents 1"/>
<connect from_op="Documents to Data" from_port="example set" to_op="Loop Attributes" to_port="input 1"/>
<connect from_op="Loop Attributes" from_port="output 1" to_op="Append" to_port="example set 1"/>
<connect from_op="Loop Attributes" from_port="output 2" to_port="result 4"/>
<connect from_op="Append" from_port="merged set" to_op="Parse Numbers" to_port="example set input"/>
<connect from_op="Parse Numbers" from_port="example set output" to_op="Multiply" to_port="input"/>
<connect from_op="Multiply" from_port="output 1" to_op="Sort" to_port="example set input"/>
<connect from_op="Multiply" from_port="output 2" to_op="Sort (2)" to_port="example set input"/>
<connect from_op="Multiply" from_port="output 3" to_op="Sort (3)" to_port="example set input"/>
<connect from_op="Sort (3)" from_port="example set output" to_op="Negative" to_port="example set input"/>
<connect from_op="Sort (2)" from_port="example set output" to_op="Neutral" to_port="example set input"/>
<connect from_op="Sort" from_port="example set output" to_op="Positive" to_port="example set input"/>
<connect from_op="Negative" from_port="example set output" to_port="result 3"/>
<connect from_op="Neutral" from_port="example set output" to_port="result 2"/>
<connect from_op="Positive" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
<portSpacing port="sink_result 4" spacing="0"/>
<portSpacing port="sink_result 5" spacing="0"/>
</process>
</operator>
</process>

 

 

Tagged:
0
0 votes

Active · Last Updated -

Comments

  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor Posts: 2,130  Community Manager
  • js_js_ Member Posts: 3 Learner I
    @lionelderkrikor

    Thanks so much for sharing the explanation and this example with the community. It's really helpful. I'm pretty new to RM and tend to learn best by tinkering and tearing apart. That said, I was playing around with the file you created in the community examples section in RM. Aside from changing the two suggested parameters, "Aylien and twitter" the template seems to be kicking out an 'input is missing' error. I was wondering if you might be able to provide some insight with how to go about fixing this. 

    Thanks so much!

    -js

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 683   Unicorn
    HI @js_

    I'm not able to reproduce the error you encounred
    Can you please share your process ?

    Regards,

    Lionel

  • js_js_ Member Posts: 3 Learner I
    I kept the entire process you created the same. I'm getting an error within subprocess 3 'sort (3)'. It says that "input is missing" I would post the image but I don't have priveledges. 

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 683   Unicorn
    Hi @js_,

    OK I understood : It's an inversion of the link between Subprocess (2) and Subprocess (3).
    Here the updated process : 
    <?xml version="1.0" encoding="UTF-8"?><process version="9.1.000-BETA2">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="9.1.000-BETA2" expanded="true" name="Process" origin="GENERATED_COMMUNITY">
        <parameter key="logverbosity" value="init"/>
        <parameter key="random_seed" value="2001"/>
        <parameter key="send_mail" value="never"/>
        <parameter key="notification_email" value=""/>
        <parameter key="process_duration_for_mail" value="30"/>
        <parameter key="encoding" value="SYSTEM"/>
        <process expanded="true">
          <operator activated="true" class="social_media:search_twitter" compatibility="9.0.000" expanded="true" height="68" name="Search Twitter" origin="GENERATED_COMMUNITY" width="90" x="45" y="340">
            <parameter key="connection" value="dkk"/>
            <parameter key="query" value="iphone"/>
            <parameter key="result_type" value="recent or popular"/>
            <parameter key="limit" value="40"/>
            <parameter key="language" value="en"/>
            <parameter key="filter_by_geo_location" value="false"/>
            <parameter key="radius_unit" value="miles"/>
            <description align="center" color="purple" colored="true" width="126">SET YOUR TWITTER QUERY AND YOUR TWITTER CONNECTION IN THE PARAMETERS PANEL FIRST!!</description>
          </operator>
          <operator activated="true" class="subprocess" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Subprocess" origin="GENERATED_COMMUNITY" width="90" x="179" y="340">
            <process expanded="true">
              <operator activated="true" class="replace" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Replace" origin="GENERATED_COMMUNITY" width="90" x="45" y="34">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="Text"/>
                <parameter key="attributes" value=""/>
                <parameter key="use_except_expression" value="false"/>
                <parameter key="value_type" value="nominal"/>
                <parameter key="use_value_type_exception" value="false"/>
                <parameter key="except_value_type" value="file_path"/>
                <parameter key="block_type" value="single_value"/>
                <parameter key="use_block_type_exception" value="false"/>
                <parameter key="except_block_type" value="single_value"/>
                <parameter key="invert_selection" value="false"/>
                <parameter key="include_special_attributes" value="false"/>
                <parameter key="replace_what" value="@|#"/>;
              </operator>
              <operator activated="true" class="select_attributes" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Select Attributes" origin="GENERATED_COMMUNITY" width="90" x="179" y="34">
                <parameter key="attribute_filter_type" value="subset"/>
                <parameter key="attribute" value=""/>
                <parameter key="attributes" value="Text"/>
                <parameter key="use_except_expression" value="false"/>
                <parameter key="value_type" value="attribute_value"/>
                <parameter key="use_value_type_exception" value="false"/>
                <parameter key="except_value_type" value="time"/>
                <parameter key="block_type" value="attribute_block"/>
                <parameter key="use_block_type_exception" value="false"/>
                <parameter key="except_block_type" value="value_matrix_row_start"/>
                <parameter key="invert_selection" value="false"/>
                <parameter key="include_special_attributes" value="false"/>
              </operator>
              <connect from_port="in 1" to_op="Replace" to_port="example set input"/>
              <connect from_op="Replace" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
              <connect from_op="Select Attributes" from_port="example set output" to_port="out 1"/>
              <portSpacing port="source_in 1" spacing="0"/>
              <portSpacing port="source_in 2" spacing="0"/>
              <portSpacing port="sink_out 1" spacing="0"/>
              <portSpacing port="sink_out 2" spacing="0"/>
            </process>
            <description align="center" color="transparent" colored="false" width="126">ETL</description>
          </operator>
          <operator activated="true" class="com.aylien.textapi.rapidminer:aylien_sentiment" compatibility="0.2.000" expanded="true" height="68" name="Analyze Sentiment" origin="GENERATED_COMMUNITY" width="90" x="313" y="340">
            <parameter key="connection" value="Aylien_dkk"/>
            <parameter key="input_attribute" value="Text"/>
            <parameter key="sentiment_mode" value="tweet"/>
            <parameter key="Is input URL" value="false"/>
            <description align="center" color="purple" colored="true" width="126">SET YOUR AYLIEN CONNECTION IN THE PARAMETERS PANEL FIRST!!</description>
          </operator>
          <operator activated="true" class="subprocess" compatibility="9.1.000-BETA2" expanded="true" height="103" name="Subprocess (2)" origin="GENERATED_COMMUNITY" width="90" x="514" y="340">
            <process expanded="true">
              <operator activated="true" class="multiply" compatibility="9.1.000-BETA2" expanded="true" height="103" name="Multiply (2)" origin="GENERATED_COMMUNITY" width="90" x="45" y="136"/>
              <operator activated="true" class="nominal_to_text" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Nominal to Text" origin="GENERATED_COMMUNITY" width="90" x="179" y="34">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="Text"/>
                <parameter key="attributes" value=""/>
                <parameter key="use_except_expression" value="false"/>
                <parameter key="value_type" value="nominal"/>
                <parameter key="use_value_type_exception" value="false"/>
                <parameter key="except_value_type" value="file_path"/>
                <parameter key="block_type" value="single_value"/>
                <parameter key="use_block_type_exception" value="false"/>
                <parameter key="except_block_type" value="single_value"/>
                <parameter key="invert_selection" value="false"/>
                <parameter key="include_special_attributes" value="false"/>
              </operator>
              <operator activated="true" class="text:process_document_from_data" compatibility="8.1.000" expanded="true" height="82" name="Process Documents from Data" origin="GENERATED_COMMUNITY" width="90" x="313" y="34">
                <parameter key="create_word_vector" value="true"/>
                <parameter key="vector_creation" value="Term Occurrences"/>
                <parameter key="add_meta_information" value="true"/>
                <parameter key="keep_text" value="true"/>
                <parameter key="prune_method" value="none"/>
                <parameter key="prune_below_percent" value="3.0"/>
                <parameter key="prune_above_percent" value="30.0"/>
                <parameter key="prune_below_rank" value="0.05"/>
                <parameter key="prune_above_rank" value="0.95"/>
                <parameter key="datamanagement" value="double_sparse_array"/>
                <parameter key="data_management" value="auto"/>
                <parameter key="select_attributes_and_weights" value="false"/>
                <list key="specify_weights"/>
                <process expanded="true">
                  <operator activated="true" class="text:tokenize" compatibility="8.1.000" expanded="true" height="68" name="Tokenize" origin="GENERATED_COMMUNITY" width="90" x="313" y="34">
                    <parameter key="mode" value="non letters"/>
                    <parameter key="characters" value=".:"/>
                    <parameter key="language" value="English"/>
                    <parameter key="max_token_length" value="3"/>
                  </operator>
                  <operator activated="true" class="text:filter_stopwords_english" compatibility="8.1.000" expanded="true" height="68" name="Filter Stopwords (English)" origin="GENERATED_COMMUNITY" width="90" x="447" y="34"/>
                  <operator activated="true" class="text:filter_by_length" compatibility="8.1.000" expanded="true" height="68" name="Filter Tokens (by Length)" origin="GENERATED_COMMUNITY" width="90" x="581" y="34">
                    <parameter key="min_chars" value="4"/>
                    <parameter key="max_chars" value="25"/>
                  </operator>
                  <connect from_port="document" to_op="Tokenize" to_port="document"/>
                  <connect from_op="Tokenize" from_port="document" to_op="Filter Stopwords (English)" to_port="document"/>
                  <connect from_op="Filter Stopwords (English)" from_port="document" to_op="Filter Tokens (by Length)" to_port="document"/>
                  <connect from_op="Filter Tokens (by Length)" from_port="document" to_port="document 1"/>
                  <portSpacing port="source_document" spacing="0"/>
                  <portSpacing port="sink_document 1" spacing="0"/>
                  <portSpacing port="sink_document 2" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="text:data_to_documents" compatibility="8.1.000" expanded="true" height="68" name="Data to Documents" origin="GENERATED_COMMUNITY" width="90" x="447" y="34">
                <parameter key="select_attributes_and_weights" value="false"/>
                <list key="specify_weights"/>
              </operator>
              <operator activated="true" class="text:documents_to_data" compatibility="8.1.000" expanded="true" height="82" name="Documents to Data" origin="GENERATED_COMMUNITY" width="90" x="581" y="34">
                <parameter key="text_attribute" value="Category"/>
                <parameter key="add_meta_information" value="true"/>
                <parameter key="datamanagement" value="double_sparse_array"/>
                <parameter key="data_management" value="auto"/>
              </operator>
              <operator activated="true" class="concurrency:loop_attributes" compatibility="8.2.000" expanded="true" height="82" name="Loop Attributes" origin="GENERATED_COMMUNITY" width="90" x="715" y="34">
                <parameter key="attribute_filter_type" value="subset"/>
                <parameter key="attribute" value="AMOLED"/>
                <parameter key="attributes" value="Category|polarity_confidence|subjectivity|subjectivity_confidence|polarity|Id|text"/>
                <parameter key="use_except_expression" value="false"/>
                <parameter key="value_type" value="attribute_value"/>
                <parameter key="use_value_type_exception" value="false"/>
                <parameter key="except_value_type" value="time"/>
                <parameter key="block_type" value="attribute_block"/>
                <parameter key="use_block_type_exception" value="false"/>
                <parameter key="except_block_type" value="value_matrix_row_start"/>
                <parameter key="invert_selection" value="true"/>
                <parameter key="include_special_attributes" value="false"/>
                <parameter key="attribute_name_macro" value="loop_attribute"/>
                <parameter key="reuse_results" value="false"/>
                <parameter key="enable_parallel_execution" value="true"/>
                <process expanded="true">
                  <operator activated="true" class="handle_exception" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Handle Exception" origin="GENERATED_COMMUNITY" width="90" x="313" y="34">
                    <process expanded="true">
                      <operator activated="true" class="aggregate" compatibility="8.2.000" expanded="true" height="82" name="Aggregate" origin="GENERATED_COMMUNITY" width="90" x="112" y="34">
                        <parameter key="use_default_aggregation" value="false"/>
                        <parameter key="attribute_filter_type" value="all"/>
                        <parameter key="attribute" value=""/>
                        <parameter key="attributes" value=""/>
                        <parameter key="use_except_expression" value="false"/>
                        <parameter key="value_type" value="attribute_value"/>
                        <parameter key="use_value_type_exception" value="false"/>
                        <parameter key="except_value_type" value="time"/>
                        <parameter key="block_type" value="attribute_block"/>
                        <parameter key="use_block_type_exception" value="false"/>
                        <parameter key="except_block_type" value="value_matrix_row_start"/>
                        <parameter key="invert_selection" value="false"/>
                        <parameter key="include_special_attributes" value="false"/>
                        <parameter key="default_aggregation_function" value="average"/>
                        <list key="aggregation_attributes">
                          <parameter key="%{loop_attribute}" value="sum"/>
                        </list>
                        <parameter key="group_by_attributes" value="polarity"/>
                        <parameter key="count_all_combinations" value="false"/>
                        <parameter key="only_distinct" value="false"/>
                        <parameter key="ignore_missings" value="true"/>
                      </operator>
                      <connect from_port="in 1" to_op="Aggregate" to_port="example set input"/>
                      <connect from_op="Aggregate" from_port="example set output" to_port="out 1"/>
                      <portSpacing port="source_in 1" spacing="0"/>
                      <portSpacing port="source_in 2" spacing="0"/>
                      <portSpacing port="sink_out 1" spacing="0"/>
                      <portSpacing port="sink_out 2" spacing="0"/>
                    </process>
                    <process expanded="true">
                      <connect from_port="in 1" to_port="out 1"/>
                      <portSpacing port="source_in 1" spacing="0"/>
                      <portSpacing port="source_in 2" spacing="0"/>
                      <portSpacing port="sink_out 1" spacing="0"/>
                      <portSpacing port="sink_out 2" spacing="0"/>
                    </process>
                  </operator>
                  <operator activated="true" class="transpose" compatibility="8.1.010" expanded="true" height="82" name="Transpose" origin="GENERATED_COMMUNITY" width="90" x="447" y="34"/>
                  <operator activated="true" class="rename_by_example_values" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Rename by Example Values" origin="GENERATED_COMMUNITY" width="90" x="581" y="34">
                    <parameter key="row_number" value="1"/>
                  </operator>
                  <connect from_port="input 1" to_op="Handle Exception" to_port="in 1"/>
                  <connect from_op="Handle Exception" from_port="out 1" to_op="Transpose" to_port="example set input"/>
                  <connect from_op="Transpose" from_port="example set output" to_op="Rename by Example Values" to_port="example set input"/>
                  <connect from_op="Rename by Example Values" from_port="example set output" to_port="output 1"/>
                  <portSpacing port="source_input 1" spacing="0"/>
                  <portSpacing port="source_input 2" spacing="0"/>
                  <portSpacing port="sink_output 1" spacing="0"/>
                  <portSpacing port="sink_output 2" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="append" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Append" origin="GENERATED_COMMUNITY" width="90" x="849" y="34">
                <parameter key="datamanagement" value="double_array"/>
                <parameter key="data_management" value="auto"/>
                <parameter key="merge_type" value="all"/>
              </operator>
              <operator activated="true" class="parse_numbers" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Parse Numbers" origin="GENERATED_COMMUNITY" width="90" x="983" y="34">
                <parameter key="attribute_filter_type" value="subset"/>
                <parameter key="attribute" value=""/>
                <parameter key="attributes" value="positive|neutral|negative"/>
                <parameter key="use_except_expression" value="false"/>
                <parameter key="value_type" value="nominal"/>
                <parameter key="use_value_type_exception" value="false"/>
                <parameter key="except_value_type" value="file_path"/>
                <parameter key="block_type" value="single_value"/>
                <parameter key="use_block_type_exception" value="false"/>
                <parameter key="except_block_type" value="single_value"/>
                <parameter key="invert_selection" value="false"/>
                <parameter key="include_special_attributes" value="false"/>
                <parameter key="decimal_character" value="."/>
                <parameter key="grouped_digits" value="false"/>
                <parameter key="grouping_character" value=","/>
                <parameter key="infinity_representation" value=""/>
                <parameter key="unparsable_value_handling" value="fail"/>
              </operator>
              <connect from_port="in 1" to_op="Multiply (2)" to_port="input"/>
              <connect from_op="Multiply (2)" from_port="output 1" to_op="Nominal to Text" to_port="example set input"/>
              <connect from_op="Multiply (2)" from_port="output 2" to_port="out 2"/>
              <connect from_op="Nominal to Text" from_port="example set output" to_op="Process Documents from Data" to_port="example set"/>
              <connect from_op="Process Documents from Data" from_port="example set" to_op="Data to Documents" to_port="example set"/>
              <connect from_op="Data to Documents" from_port="documents" to_op="Documents to Data" to_port="documents 1"/>
              <connect from_op="Documents to Data" from_port="example set" to_op="Loop Attributes" to_port="input 1"/>
              <connect from_op="Loop Attributes" from_port="output 1" to_op="Append" to_port="example set 1"/>
              <connect from_op="Append" from_port="merged set" to_op="Parse Numbers" to_port="example set input"/>
              <connect from_op="Parse Numbers" from_port="example set output" to_port="out 1"/>
              <portSpacing port="source_in 1" spacing="0"/>
              <portSpacing port="source_in 2" spacing="0"/>
              <portSpacing port="sink_out 1" spacing="0"/>
              <portSpacing port="sink_out 2" spacing="126"/>
              <portSpacing port="sink_out 3" spacing="0"/>
            </process>
            <description align="center" color="transparent" colored="false" width="126">Text Processing</description>
          </operator>
          <operator activated="true" class="subprocess" compatibility="9.1.000-BETA2" expanded="true" height="124" name="Subprocess (3)" origin="GENERATED_COMMUNITY" width="90" x="715" y="391">
            <process expanded="true">
              <operator activated="true" breakpoints="after" class="multiply" compatibility="9.1.000-BETA2" expanded="true" height="124" name="Multiply" origin="GENERATED_COMMUNITY" width="90" x="45" y="136"/>
              <operator activated="true" class="sort" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Sort (3)" origin="GENERATED_COMMUNITY" width="90" x="179" y="238">
                <parameter key="attribute_name" value="negative"/>
                <parameter key="sorting_direction" value="decreasing"/>
              </operator>
              <operator activated="true" class="sort" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Sort (2)" origin="GENERATED_COMMUNITY" width="90" x="179" y="136">
                <parameter key="attribute_name" value="neutral"/>
                <parameter key="sorting_direction" value="decreasing"/>
              </operator>
              <operator activated="true" class="sort" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Sort" origin="GENERATED_COMMUNITY" width="90" x="179" y="34">
                <parameter key="attribute_name" value="positive"/>
                <parameter key="sorting_direction" value="decreasing"/>
              </operator>
              <operator activated="true" class="filter_example_range" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Negative" origin="GENERATED_COMMUNITY" width="90" x="313" y="238">
                <parameter key="first_example" value="1"/>
                <parameter key="last_example" value="5"/>
                <parameter key="invert_filter" value="false"/>
              </operator>
              <operator activated="true" class="filter_example_range" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Neutral" origin="GENERATED_COMMUNITY" width="90" x="313" y="136">
                <parameter key="first_example" value="1"/>
                <parameter key="last_example" value="5"/>
                <parameter key="invert_filter" value="false"/>
              </operator>
              <operator activated="true" class="filter_example_range" compatibility="9.1.000-BETA2" expanded="true" height="82" name="Positive" origin="GENERATED_COMMUNITY" width="90" x="313" y="34">
                <parameter key="first_example" value="1"/>
                <parameter key="last_example" value="5"/>
                <parameter key="invert_filter" value="false"/>
              </operator>
              <connect from_port="in 1" to_op="Multiply" to_port="input"/>
              <connect from_op="Multiply" from_port="output 1" to_op="Sort" to_port="example set input"/>
              <connect from_op="Multiply" from_port="output 2" to_op="Sort (2)" to_port="example set input"/>
              <connect from_op="Multiply" from_port="output 3" to_op="Sort (3)" to_port="example set input"/>
              <connect from_op="Sort (3)" from_port="example set output" to_op="Negative" to_port="example set input"/>
              <connect from_op="Sort (2)" from_port="example set output" to_op="Neutral" to_port="example set input"/>
              <connect from_op="Sort" from_port="example set output" to_op="Positive" to_port="example set input"/>
              <connect from_op="Negative" from_port="example set output" to_port="out 1"/>
              <connect from_op="Neutral" from_port="example set output" to_port="out 2"/>
              <connect from_op="Positive" from_port="example set output" to_port="out 3"/>
              <portSpacing port="source_in 1" spacing="0"/>
              <portSpacing port="source_in 2" spacing="0"/>
              <portSpacing port="sink_out 1" spacing="0"/>
              <portSpacing port="sink_out 2" spacing="0"/>
              <portSpacing port="sink_out 3" spacing="0"/>
              <portSpacing port="sink_out 4" spacing="0"/>
            </process>
            <description align="center" color="transparent" colored="false" width="126">Post-Processing</description>
          </operator>
          <connect from_op="Search Twitter" from_port="output" to_op="Subprocess" to_port="in 1"/>
          <connect from_op="Subprocess" from_port="out 1" to_op="Analyze Sentiment" to_port="Example Set"/>
          <connect from_op="Analyze Sentiment" from_port="Example Set" to_op="Subprocess (2)" to_port="in 1"/>
          <connect from_op="Subprocess (2)" from_port="out 1" to_op="Subprocess (3)" to_port="in 1"/>
          <connect from_op="Subprocess (2)" from_port="out 2" to_port="result 4"/>
          <connect from_op="Subprocess (3)" from_port="out 1" to_port="result 1"/>
          <connect from_op="Subprocess (3)" from_port="out 2" to_port="result 2"/>
          <connect from_op="Subprocess (3)" from_port="out 3" to_port="result 3"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="42"/>
          <portSpacing port="sink_result 2" spacing="0"/>
          <portSpacing port="sink_result 3" spacing="0"/>
          <portSpacing port="sink_result 4" spacing="294"/>
          <portSpacing port="sink_result 5" spacing="0"/>
          <description align="center" color="yellow" colored="false" height="124" resized="true" width="835" x="46" y="167">&lt;h2&gt; SENTIMENT ANALYSIS WITH TWITTER AND AYLIEN &lt;/h2&gt; Author: &lt;a href="https://community.rapidminer.com/profile/lionelderkrikor"&gt;Lionel der Krikorian&lt;/a&gt;, Published: &amp;#8206;&amp;#8206;08-07-2018&lt;br&gt;&lt;br&gt;&lt;a href="https://community.rapidminer.com/discussion/51798/analyse-sentiment-process"&gt;LINK TO COMMUNITY KB ARTICLE ON THIS PROCESS&lt;/a&gt;&lt;br&gt;</description>
          <background height="790" location="//Community Samples/Community Webinar Materials/Webinar on Hotel Sentiment Analysis/webservice/misc/StudioBackgroundTemplate" width="956" x="-1" y="0"/>
        </process>
      </operator>
    </process>
    
    I hope it helps,

    Regards,

    Lionel 

    NB :  @sgenzer can you update the process in the community directory (Community Samples /Community Data Science / Sentiment Analysis) thanks you


  • js_js_ Member Posts: 3 Learner I
    @lionelderkrikor ;

    Thanks for this! I greatly appreciate the quick response and fix. 

    -js
Sign In or Register to comment.