public function _extractLocations($words, $fulltext)
{
$locations = array();
foreach ($words as $word) {
$wordlen = strlen($word);
$loc = stripos($fulltext, $word);
while ($loc !== false) {
$locations[] = $loc;
$loc = stripos($fulltext, $word, $loc + $wordlen);
}
}
$locations = array_unique($locations);
sort($locations);
return $locations;
}