本文整理匯總了PHP中thesaurus::returnThesaurus方法的典型用法代碼示例。如果您正苦於以下問題:PHP thesaurus::returnThesaurus方法的具體用法?PHP thesaurus::returnThesaurus怎麽用?PHP thesaurus::returnThesaurus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類thesaurus
的用法示例。
在下文中一共展示了thesaurus::returnThesaurus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: microtime
$time_pre = microtime(true);
// Get the Query from User input
$q = strtolower($_SESSION['query']);
if ($_SESSION['queryEx'] == 'on') {
// Query Preprocess
$thesaurus1 = new thesaurus();
$thesaurus1->loadThesaurusFile($_SESSION['thesaurus']);
$qX = new query();
if ($_SESSION['stemmer'] == 'off') {
$qX->tokeniseQuery($q);
} else {
if ($_SESSION['stemmer'] == 'on') {
$qX->tokeniseQuery(implode(" ", $qX->stem_list($q)));
}
}
$q = $qX->expandQuery($q, $thesaurus1->returnThesaurus());
}
// Process the Query
$q1 = new query();
$query1 = $q1->complexQueryGoogle($q);
$query2 = $q1->complexQueryBing($q);
$query3 = $q1->complexQueryBlekko($q);
// AGG
if ($_SESSION['result_op'] == 'agg') {
// Instantiate a new API
$api1 = new api();
// Instantiate a new formatter with the 3 result sets as properties
$formatter1 = new formatter(new resultSet(), new resultSet(), new resultSet());
// Google Results
for ($i = 0; $i < $_SESSION['results'] / 10; $i++) {
// Get offset