Re: Wrapper for liblinear

From: Date: Fri, 25 Jan 2013 10:06:27 +0000
Subject: Re: Wrapper for liblinear
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-10256@lists.php.net to get a copy of this message
Hi, have you read the wiki article we have since short? https://wiki.php.net/internals/review_comments There are a couple of points though which aren't yet there: - the code isn't C90 compatible - the variable declarations have to be at the top of the nearest block - instead of malloc should be used the php variants emalloc, efree, etc. - not all the malloc'd things are freed in OZ_predict - things like printf, fprintf, exit, etc. shouldn't be used in a productive code. As if your ext runs say under apache exit() would kill the whole process. To indicate an error please use php_error_docref or exceptions. - the return values of OZ_predict could be defined as a constant, now I just expect it to be positive/negative, but with the constants it were just more intuitive from the code You could study a couple of the pecl extensions to see how things are done and ask further questions then. Sentiments are an interesting topic anyway :) Regards Anatoliy On Thu, January 24, 2013 20:33, Edilson Osorio Junior wrote: > Hi all, > > > My name is Edilson and I am working on a open source twitter sentiment > analysis. > > To do that, I tried some projects like php-svm. The problem is that > system is so slow then working with a large dataset. > > So, I wrote a wrapper to liblinear to analyse the big data (like twitter) > and predict the sentiments about some subject. > > Publishing it on PECL seems to be the right way to this project. > > > Please, follow this link > http://www.eddieoz.com/liblinear-php-downloadingand analyse the > project. > > If you think that this project has value to your website, I'll be very > happy to see it published. > > Best regards, > Edilson > >

« previous php.pecl.dev (#10256) next »