예제 #1
0
     $zip = '';
 }
 $info->thumb = 'batchthumb/stats.jpg';
 $info->origin = $origin;
 $info->filesourceTitle = $fileTitle;
 $info->access = $access;
 $info->licence = $licence;
 $info->pubDate = gmmktime();
 $info->dateEndPrint = gmmktime(0, 0, 0, 9, 1, 2013);
 $info->heat = 1;
 $cat = array("TRANSPORT#STATION", "STATISTIQUES");
 $info->setYakCat($cat);
 $info->status = 1;
 $info->print = 1;
 $info->yakType = 3;
 $info->setZone("PARIS");
 $info->placeName = 'station ' . $title;
 // NOTE, since it goes in the YAKDICO, we need to add the word 'station' before. If we do not all words 'CHATELET' will be detected by semantic
 $locationQuery = 'station ' . $data[2] . ' ' . $title . ' ' . $zip . ' ' . $city . ', France';
 $cat = array("TRANSPORT#STATION", "STATISTIQUES");
 $info->setYakCat($cat);
 $res = $info->saveToMongoDB($locationQuery, $debug, $updateFlag);
 if (!empty($res['error'])) {
     echo $res['error'];
     echo '<br><b>BATCH FAILLED</b><br>';
     exit;
 }
 foreach ($res as $k => $v) {
     if (isset($v)) {
         $results[$k] += $v;
     }
예제 #2
0
 }
 $info->thumb = 'batchthumb/rentree.jpg';
 $info->origin = $origin;
 $info->filesourceTitle = $fileTitle;
 $info->access = $access;
 $info->licence = $licence;
 $info->pubDate = gmmktime();
 $info->dateEndPrint = gmmktime(0, 0, 0, 9, 1, 2013);
 $info->heat = 1;
 $cat = array("EDUCATION", "EDUCATION#ECOLE");
 $info->setYakCat($cat);
 $info->status = 1;
 $info->print = 1;
 $info->yakType = 3;
 $info->setTel($data[5]);
 $info->setZone("MONTPELLIER");
 $info->placeName = $data[3];
 $locationQuery = $data[7] . ' ' . $data[11] . ', ' . $data[13] . ', Montpellier, France';
 //echo $locationQuery;
 $res = $info->saveToMongoDB($locationQuery, $debug, $updateFlag);
 if (!empty($res['error'])) {
     echo $res['error'];
     echo '<br><b>BATCH FAILLED</b><br>';
     exit;
 }
 foreach ($res as $k => $v) {
     if (isset($v)) {
         $results[$k] += $v;
     }
 }
 $results['parse']++;