$formatter1->setBlekkoJson($api1->returnBlekkoJsonData(), $api1->returnBlekkoJsonResultFlag()); $formatter1->formatBlekkoJson($_SESSION['results'], 0); // Instantate Aggregator $aggregator1 = new aggregator(new resultSet()); // Send result sets 1,2 & 3 to Data Fusion Function $aggregator1->dataFusion($api1->returnGoogleJsonResultFlag(), $api1->returnBingJsonResultFlag(), $api1->returnBlekkoJsonResultFlag(), $formatter1->returnResultSet('resultSet1'), $formatter1->returnResultSet('resultSet2'), $formatter1->returnResultSet('resultSet3')); // Instantiate Cluster Object $cluster1 = new cluster(); // Instantiate Stopword Dictionary $stopwordDictionary = new dictionary('stop-words-english2-short.txt'); //$stopwordDictionary->loadStopwordFile(); // Add Query to Stopwords $stopwordDictionary->addQueryToStopwords($cluster1->tokeniseString($q)); $stopwords = $stopwordDictionary->returnStopwords(); // Find the cluster terms of interest $cluster1->findBinaTerms($aggregator1->returnResultSetAggSnippets()); // Count Term Freq //$cluster1->countTermFrequency($aggTitles); //$cluster1->countTermFrequency($aggregator1->returnResultSetAggSnippets()); // Set most frequet terms //$cluster1->setMostFrequentTerms(10); //$cluster1->stopwordRemoval($stopwords); //echo $cluster1->countClusteredTerms(); //$cluster1->displayClusteredTerms(); $cluster1->setDocumentBinatures($aggregator1->returnResultSetAggSnippets()); //$cluster1->printBinatures(); //$cluster1->printBinatureSums(); //echo $aggSnippets[0]; $ticks = 3; $cluster1->setBindroids($ticks); $cluster1->binBinatures($ticks);