Hacker News new | ask | show | jobs
Ask HN: How should I implement sentiment analysis with no money?
5 points by penguinium 2074 days ago
I'm making a product and hosting on a very cheap server I can afford. One feature uses the sentiment of user input.

So far, I'm doing it with an old, bulky neural network running as a process on the same web server. It works okay, but I think that will scale very poorly.

So I'm considering other options. I can use a small, fast naive sentiment classifier (like TextBlob), but it has really bad accuracy. Alternatively, I can use free credits on the Google Cloud sentiment API until I get a customer and can afford to set my own fast, accurate analysis server up. But I don't know if I will have enough cloud credits to get me to that point, without getting squeezed.

So I'm not sure what to do. Do you have any ideas?

2 comments

Do it client-side with tensorflow.js
Another spin on this is to make it a DAPP(decentralized app) where users pay for invocations. Look at something like iExec.

I was toying a few years ago with iExec to do some bioinformatics algorithms at a low cost on an infrastructure that users could pay for, but that I wouldn't have to pay to host.

The benefit of this is that it doesn't have to just be client side. It can also be backend as well.

Oh that's interesting! But won't a big model heavily slow down the website? Is there a model that you think might be tractable for this sorta thing?
if you run it in a web worker, it should run on a separate thread to the website itself so it shouldn't cause the website any issues unless the model eats all the user's RAM.
Is it reliable for mobile users? What if they visit another page before the model finishes evaluating?
1. You'd have to try it out with your model

2. Then presumably they don't get their result, but that's to be expected if they navigate away

Can you self host some of it? How much can you afford, you left that part out so it is hard to figure out what would fit in your budget.
~$40 a month