I am using Ian Barbers Naive Bayes analysis class to analyze the sentiment of sentences for a school project. I have created my own datasets of positive neutral and negatives. My problem is I have no clue on how to implement the neutrals and get the class to find them. The link below is for the php class I am using
Share
Well the
Opinionclass is already pretty flexible for adding new “sentiment classes”. Just theclassifymethod has implemented the calculation of “prior” static. But it can be easily replaced with aforeach: