views:

393

answers:

2

I am looking for a PHP library which does more or less the same thing as this webpage: http://textalyser.net/

I know that there are popular libraries in python and java, but I am looking for a PHP version. Thanks for your help!

+1  A: 

Short Answer

As far as I'm aware there's isn't one, or at least not a well-known / well-distributed one.

Long Answer

The closes de-facto code I've come across is php-text-statistics by Dave Child (since the PEAR version has been unmaintained for years) but that only takes care of readability and sentence, word and syllable counting. Any other data you'd have to get yourself with count_chars, str_word_count, substr_count, preg_match_all and the like. And of course some math skills to calculate all the percentages.

That said, I'm not sure exactly what is it you'd want the library to do, or what http://textalyser.net/ does...
(I mean what is a stoplist anyway? Or an exhaustive polyword phrase, for that matter...?)

Ben Peachey
I second that, in fact its looking like your only more or less solid option!
Alex
A: 

I'm looking for a similiar thing at the moment and the options I have found so far are to make use of the Zend Lucene Search functionality.

http://www.opendocs.net/php/zend/ZendFramework-0.1.5/documentation/end-user/pl/zend.search.extending.html

or alternatively to look into the Open Calais API. http://www.opencalais.com/ (from Thomson Reuters)

I have yet to explore either option but I think that there might be some mileage in them for building dynamic links or hyper(con)textualising web pages.

Ian Lewis