The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Dictionary Based Sentiment Analysis"
Benedict_von_Ah
Member Posts: 8 Contributor I
Hey guys,
i'm currently working on a dictionary based sentiment analysis from the Operator Toolbox. Everything works out fine so far, but in the end i cannot add a date as an attribute to my output. The model only allows "Text", "Score", "Positivity", "Negativity" and "uncovered token".
Is there a way to add the date from my dataset? So i want the output "Date", "Text", "Score",...
Tagged:
0
Best Answer
-
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
Hi,
i've sent you a version of the new operator via mail. I will add it to the marketplace toolbox if this is what you need.
Cheers,
Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany1
Answers
Here is my process:
Your XML process is corrupted. Please open the XML view and copy the XML from there.
how do i get to the xml view?
Try this search: https://community.rapidminer.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&q=XML%20view
yea, thanks
my code is just above your comment
Have you tried using a Set Role to set your Date value as an ID role in the first subprocess? That should flow through the process
hey thanks, i fixed the date problem with excel but got to a new problem.
do you know a way how i can get to the number of covered/ recognised tokens for each of my text set?
So the text of day 1 contains 50 tokens and with the dictionary model i get the score of i.e. +2, but i don't know if it is a single word with the weighting of +2 or if its a 100 words with a weighting of 0.02.
That would be very important to know.
My code is still the same as above
Thanks
Hi,
this is not yet implemented, but not too hard to do... I will check if i can to this tomorrow.
Edit: As a work around: you can simply set all weights to -1 or +1 and run it a second time. Afterwards you just rename and join the results.
Best,
Martin
Dortmund, Germany
Hi Martin,
could you also sent me the updated version?
Best regards
Simon
Dear @simon_kuehne
it's on the marketplace. We've updated operator toolbox on Friday.
Best,
Martin
Dortmund, Germany
Hi Martin,
thanks. I tried it but it didn't solve my problem.
I need some additional data or at least the ID and not only "text" in the results after applying the dictionary based sentiment. The role of the id variable is set as "id".
Thank you!
Simon
hi,
good point. You might be able to join back the original data by joining on the text attribute.
Best,
Martin
Dortmund, Germany
Unfortunately, this is not possible as the text is not a unique attribute. Many tweets are retweets and look the same after some "document processing" steps but differ in terms of metadata (,e.g. geo coordinates).
Is there a workaround or anything?
Best,
Simon
Hi,
i see the point. You could add a nominal counter right before the operator to make texts unique.
Best,
Martin
Dortmund, Germany
Hi,
i solved it by using "select attributes" right before the text processing loop where I selected the text variable only. After applying the dictionary based sentiment analysis I also added "Generate ID". I did the same for the orginal output of the "select attributes" module and then joined the data using "ID".
Thanks for your help.
Best,
Simon
Hi @simon_kuehne,
nice workaround! if you would use the Merge operator of toolbox you would not need an ID .
How would you enhance the operator?
Best,
Martin
Dortmund, Germany
Hi Martin,
i think the best way to enhance this operator would be to add some options allowing to add metadata and to choose which variable is the text variable used for the sentiment analysis.
I had another issue with the operator: As I am analyzing tweets, there are lots of hashtags which contain relevant keywords e.g., #ILikeThatKeyword. The problem is that, I did not find a way to extract this hashtag into 4 tokens or to make the operator search for those matches also instad of word tokens only.
Best,
Simon