Login   Register  
PHP Classes
elePHPant
Icontem

File: moby_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Brent Rossen  >  Moby Thesaurus  >  moby_example.php  >  Download  
File: moby_example.php
Role: Example script
Content type: text/plain
Description: Example script for calling the MobyThesaurus functions
Class: Moby Thesaurus
Get synonyms and parts of speech of given words
Author: By
Last change:
Date: 2010-05-18 07:37
Size: 642 bytes
 

Contents

Class file image Download
<?php
require_once 'MobyThesaurus.php';
echo 
"<h1>Demonstrating MobyThesaurus Class</h1>";

echo 
"<h3>Getting Synonyms for 'medications' (MobyThesaurus::GetSynonyms)</h3>";
$start_time microtime(true);
$synonyms MobyThesaurus::GetSynonyms("medications");
var_export($synonyms);
echo 
"<br><br>Processing Time: " . (microtime(true) - $start_time) . "<br>";

echo 
"<br><h3>Getting Part of Speech for 'feel' (MobyThesaurus::GetPartsOfSpeech)</h3>";
$start_time microtime(true);
$pos MobyThesaurus::GetPartsOfSpeech("feel");
var_export($pos);
echo 
"<br><br>Processing Time: " . (microtime(true) - $start_time) . "<br>";

?>