readFromFile(${'bing' . $i}, $bingDirectory, $fileName);
    //getMetrics
    getMetrics($mainMetrics, $goldStandardArr, "bing", $query, $queryNumber, ${'bing' . $i});
    ${'blekko' . $i} = array();
    readFromFile(${'blekko' . $i}, $blekkoDirectory, $fileName);
    //getMetrics
    getMetrics($mainMetrics, $goldStandardArr, "blekko", $query, $queryNumber, ${'blekko' . $i});
    ${'google' . $i} = array();
    readFromFile(${'google' . $i}, $googleDirectory, $fileName);
    //getMetrics
    getMetrics($mainMetrics, $goldStandardArr, "google", $query, $queryNumber, ${'google' . $i});
    ${'aggregated' . $i} = array();
    readFromFile(${'aggregated' . $i}, $aggregatedDirectory, $fileName);
    //getMetrics
    getMetrics($mainMetrics, $goldStandardArr, "aggregated", $query, $queryNumber, ${'aggregated' . $i});
    ${'weighted' . $i} = array();
    readFromFile(${'weighted' . $i}, $weightedDirectory, $fileName);
    //getMetrics
    getMetrics($mainMetrics, $goldStandardArr, "weighted", $query, $queryNumber, ${'weighted' . $i});
}
//Call Function to calculate the Mean Average Precision
getMaps($mapScores, $mainMetrics);
//DISPLAY THE RESULTS
displayMetrics($mainMetrics, $mapScores);
//function in metrics.php
//WRITE THE METRICS SCORES TO FILES
writeToFile($mainMetrics, "metrics/evaluationScores", "mainMetrics");
writeToFile($mapScores, "metrics/evaluationScores", "mapScores");
//WRITE THE METRICS TO CSV FILE
writeToCSV($mainMetrics, $mapScores, "metrics/evaluationScores", "combinedMetrics");
Пример #2
0
function collectTweets($query, $from_pg, $to_pg)
{
    writeToCSV(tweetCollector($query, $from_pg, $to_pg), $query);
}