Designing a Sentiment Analysis Based Curation System

in #curation3 years ago

I have recently discovered that Hive has been forked out of the Steem blockchain and was surprised to know that there is some balance in my account that amounts to several hundred dollars. Also, the API for Steem blockchain and hive is the same so writing a curation bot is almost the same as that on the Steem platform. And let me tell you that I run a curation bot on Steem blockchain that is currently curating with an average efficiency of 20%. It ain't much however it's increasing day by day and my bot is getting better and better. You can check my steem account @pankajwahane

screenshot_2021_12_24_at_2.43.01_am.png

There is a 90% chance that you do not like the concept of bots on this platform and some of you would instantly downvote the content generated by the bot. However, I think if a bot can accurately identify the most positive content available and vote on it then there will be no harm caused to the platform and its communities. If you think otherwise then please let me know in the comments.

Coming back to the point of designing the bot, for me, it has to have four main things

  • Capability to find out when my voting power is 100%
  • Capability to read hot posts at that moment and select the most positive post as per the sentiment score of post
  • Capability to comment on the post - generally people love compliments and I believe if I appreciate the post for being positive I shall get some votes.
  • As the main goal is to curate the most positive content we need the capability to vote.

All this can be simply written using dhive library if you know Javascript. You may alternatively use python if that is your poison.

Pseudo code:

function getVotingPower() { // Find vesting shares and current mana // Calculate the percentage based on that } function getHotPosts(){ // Call the blockchains database API to get the hot posts } function getSentimentScore(post){ // Use a sentiment analysis library or service to find sentiment for a post } function comment(author,permalink){ // Find the host post with highest sentiment score // Comment on the blogpost } function vote(author,permalink){ // Vote the post when the voting power is 100% }

Once you are done writing code then just upload it to a Lambda function on AWS. The first million calls every month are free. Use AWS EventBridge to schedule the execution of this lambda function.