Aspect-Based Sentiment Analysis Using Meaning Cloud

Dodgers
Dodgers New Altair Community Member
edited November 5 in Community Q&A
Hello,

Has anyone used Meaning Clouds operator to conduct an aspect-based sentiment analysis.

There is no tutorial or sample process showing how to use this operator.

Has anyone any guidance from using it?

Thanks

Answers

  • Caperez
    Caperez Altair Community Member
    Hi @Dodgers

    This is a tutorial of Rapidminer and Meaningcloud. 
    https://www.meaningcloud.com/blog/relationship-between-product-scores-and-text-review-sentiment
    The aspect-based analysis is quite similar
    I hope this can help you. 

    Best, 

    Cesar
  • Dodgers
    Dodgers New Altair Community Member
    Hello,

    I keep getting an error message when I use MeaningCloud operators. I've used the generic toolbox "extract sentiment" operator and it works perfect on my data. But this is not granular enough.

    But when I try use MeaningCloud Aspect based operator I get the 212 error message "No content to analyse"

    Attached is my workflow. I also have attached the error message I get.

    Could someone assist with what is wrong?

    Thanks

  • Caperez
    Caperez Altair Community Member
    Hi @Dodgers

    I use to have this problem with Meaningcloud. It occurs sometimes when  you lose the communication with the API. 
    In order to verify if my process is good, I use to work with a reduced exampleset (using Sample Operator) and monitoring the log in Rapidminer. 

    Best, 

    Cesar
  • Dodgers
    Dodgers New Altair Community Member
    Hello Cesar,

    So, using a sample to test the process does appear to make it work on the sample data.

    However, does this not work then on larger sizes of datasets?

    I have around 8000 rows on my dataset which I wouldn't of considered to be that large of dataset. 

    But it won't run on the full dataset. Only if I use the sample operator.

    Thanks
  • Dodgers
    Dodgers New Altair Community Member
    Okay, so once I take the sample operator out it just returns an error.

    Can someone help please?
  • Marco_Barradas
    Marco_Barradas
    Altair Employee
    edited June 2022
    Hi @Dodgers ,
    You can use the Loop Batches operator to split your DS into smaller batches that can be handled by the API.

    You'll need to store the output to a DS or write it back to a Database to keep the results of each run. That way you can overcome that error. 

    Also use a Handle Exception operator to avoid loosing your results in case the AP throws and error on any of the batches.

    Also check on the meaning cloud end what is the limit rate they put on their API. 
  • Dodgers
    Dodgers New Altair Community Member
    Hello,

    How would this process handle results? As in, will it return results at the end for all batches together?

    Also, where in the process would "Handle Exception" go?


    Thanks
  • Dodgers
    Dodgers New Altair Community Member
    In relation to MeaningCloud... I have reached out to them on this. However, they have not responded. I would not rate their customer service!
  • Marco_Barradas
    Marco_Barradas
    Altair Employee
    Hi @Dodgers you should use the handle exception to wrap all the steps that are related to the meaning cloud operator. 
    The handle exception catches the error and lets you perform some steps to continue your process.

    You can check how it works in the follwing video from academy.


    Error and exception handling in a process | RapidMiner

  • Dodgers
    Dodgers New Altair Community Member
    Hello,

    I tried this as per your comment to cover both operators from MeaningCloud with handle exception operator. This did not work however - see screenshot of one version I tried. 

    Attached is the ABSA process. I can get 200 rows in a batch. However, I do not know how it is possible to bring all the results back into one cumulative report/file.

    I will  have to have 41 batches to manage my database - but I do not want all the results from each batch separate. 

    Can you explain using my process file how I bring all results into one report?

    Thanks

  • Marco_Barradas
    Marco_Barradas
    Altair Employee
    Hi @Dodgers I usually put a write to DB operator or to CSV inside the batches to keep track of all the process that I do.
    Another way is appending the results to a Main DS for all the good runs.
    Please try the attached Process and see if it helps you.


  • Dodgers
    Dodgers New Altair Community Member
    edited June 2022
    Thanks... It had run. But I ran out of credit with MeaningCloud. They have now fixed my credits. But the process now won't run. See attached screenshot

    Do you know what the issue is?

    ~~~Never mind, it was an issue with DB link but have that sorted now  :D ~~~

    Hopefully it'll work now


  • Dodgers
    Dodgers New Altair Community Member
    So, I ran the process but it seemed to stop after 400 rows and I just get an error no results

    Any ideas?

  • Marco_Barradas
    Marco_Barradas
    Altair Employee
    Hi @Dodgers not sure what might be happening. 
    From the screen shot you are sharing it seems that one of your Text rows has no valid text and then you get an error code and you loose all the execution. 
    From the screen I suspect that the musings are causing the error. Not sure how big your Batches are but I'll suggest you remove the missing and try to execute it again. I'm not sure if you saved the errors DS that was generated. If you did it you can re run your process only for those that failed  .

    Here is the error description from Meaning cloud webpage
    https://www.meaningcloud.com/developer/documentation/error-codes#:~:text=212%3A%20No%20content%20to%20analyze
  • Dodgers
    Dodgers New Altair Community Member
    Hello,

    I don't have any missing text from the column 'Text'. Every field in that column has a review. But for some reason the system did not pick up the content in cell as is returning a '?' in the field. I have checked my file to be sure. 

    Thanks