php-saurus iconphp-saurus 0.2 Beta

php-saurus project is a PHP extension written in C that provides language Aiksaurus bindings to your PHP installation.
php-saurus project is a PHP extension written in C that provides language Aiksaurus bindings to your PHP installation, created by Sotirios Karavarsamis. The extension makes use of the Aiksaurus library, which provides an English languge thesaurus, and is published under the GNU General Public Licence (GPL).

Through the php-saurus extension, you will be able to search for phonetically similar words and/or generate synonyms to a word in two ways: a) either as a single-dimensional array containing the synonyms; b) a two-dimensional array holding synonyms in groups of words. The latter was hacked from the original aiksaurus command-line utility, and was adopted to this PHP extension. You can grab the source of Aiksaurus from http://www.sourceforge.net/projects/aiksaurus/ and compile the extension.

Requirements:

In order to compile this extension, you will need: a) PHP 5 or a greater version; b) the the Aiksaurus library and its development files. You can either build Aiksaurus from source by downloading the source code from the abovementioned URL, or maybe there is a binary release for your distribution. Be sure to include either the library binary and development files if you fall in the latter case. The code as is compiles fine under Linux!

EXTENSION INSTALLATION

In order to install php-saurus, you will at first have to download the php-saurus source code distribution. After that, you will have to change to the directory and perform the following steps:

cd < PATH_TO_SOURCE > && tar xvzf php-saurus-< VERSION >.tar.gz && cd php-saurus-< VERSION > && phpize && ./configure --with-aiksaurus=< PATH_TO_AIKSAURUS_LIBRARY > && make.

Finally, to install the generated shared library to your systems's PHP shared lib place, you must become root (by issuing su - or sudo bash) and hit make install. To allow PHP to load this library dynamically, you will have to tell php.ini. This could be accompished by issuing (as root) the command echo "extension=Aiksaurus.so" >> /path/to/your/php.ini. Note that if you want to access the library from within Apache with mod_php, you will have to restart the server. This could be accomplished by issuing /etc/init.d/apache restart or apache2ctl -k stop && apache2ctl -k start. It depends on your distribution...

TESTING YOUR INSTALLATION

If the installation process went ok, then you will be able to call the exported php-saurus functions from your PHP intepreter (either from the CLI interface or from within Apache with mod_php). To verify that everything went ok, you can: a) copy Aiksaurus.php (contained in the php-saurus archive) to your PHP enabled web server's root directory, and check if any errors occur. If everything went well, you will see normal output from the script; eitherwise, you will get errors such as "Called to undefined function...". b) try to execute Aiksaurus.php from a CLI interface. This could be done by issuing "php Aiksaurus.php" from your shell.

last updated on:
May 23rd, 2007, 14:11 GMT
price:
FREE!
developed by:
Sotiris L Karavarsamis
license type:
GPL (GNU General Public License) 
category:
ROOT \ Utilities

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT