PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language. All the documentation for this project can be found in the wiki.
http://yooper.github.io/php-text-analysis/
For Ubuntu
sudo apt-get install libpspell-dev
sudo apt-get install php5-pspell
sudo apt-get install aspell-en
sudo apt-get install php5-enchant
For Centos
sudo yum install php5-pspell
sudo yum install aspell-en
sudo yum install php5-enchant