Example #1
0
		foreach ($wordnik as $item) {
			$words = $sWords->removeStopWords($item, 3);
			$dictionaryWeb->add($words);
		}
		$timeWordnik2 = microtime(true);
		
		$timeGoogle = microtime(true);
		$google = Context::getGoogle($_POST['text']);
		foreach ($google as $item) {
			$words = $sWords->removeStopWords($item, 3);
			$dictionaryWeb->add($words);
		}
		$timeGoogle2 = microtime(true);
		
		$timeWikipedia = microtime(true);
		$wikipedia = Context::getWikipedia($_POST['text']);
		foreach ($wikipedia as $item) {
			$words = $sWords->removeStopWords($item, 3);
			$dictionaryWeb->add($words);
		}
		$timeWikipedia2 = microtime(true);
		
		
		$webWords = "";
		$values = $dictionaryWeb->get_count_values();
		foreach ($values as $value=>$number){
			$webWords.=$number.": ".$value."<br>";
		}
		$smarty->assign("webWords", $webWords, true);