PHP Classes

add new languages

Recommend this page to a friend!

      PHP Sentiment Analyzer  >  All threads  >  add new languages  >  (Un) Subscribe thread alerts  
Subject:add new languages
Summary:how to add new languages
Messages:3
Author:behnamy
Date:2015-08-25 11:01:30
 

  1. add new languages   Reply   Report abuse  
Picture of behnamy behnamy - 2015-08-25 11:01:30
Hi, what is the easiest way to add new languages? Can I change the lines of those two files(positive and negative sentences) to another language?

  2. Re: add new languages   Reply   Report abuse  
Picture of Samuel Adeshina Samuel Adeshina - 2015-08-25 19:07:18 - In reply to message 1 from behnamy
Hi Behnamy, actually there's going to be a second part to this article that explains how to do just that, but in much more shorter text, it's very easy to add new languages all you have to do is supply a training set to the algorithm using the language that you want it to learn.
For instance if you want to train the algorithm with Spanish, supply a data file that contains spanish texts and save the positive one(s) with .pos and likewise the negative one(s) with .neg

  3. Re: add new languages   Reply   Report abuse  
Picture of Samuel Adeshina Samuel Adeshina - 2015-08-25 19:14:10 - In reply to message 2 from Samuel Adeshina
I would recommend you fork the project on GitHub: https://github.com/Samshal/PHP-Sentiment-Analyzer
Then add the languages to a separate branch and create a new pull request, this will ensure other user's benefit from your generosity.

Thanks