]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/tokenizer/legacy_tokenizer.php
remove country restriction from tokenizer
[nominatim.git] / lib-php / tokenizer / legacy_tokenizer.php
index 570b88289e7cd13a68dd13d8c5af64c519f33fe6..6760057d93b2eead9ae74d7a2719fd5e77658f57 100644 (file)
@@ -7,7 +7,6 @@ class Tokenizer
     private $oDB;
 
     private $oNormalizer = null;
-    private $aCountryRestriction = null;
 
     public function __construct(&$oDB)
     {
@@ -37,12 +36,6 @@ class Tokenizer
     }
 
 
-    public function setCountryRestriction($aCountries)
-    {
-        $this->aCountryRestriction = $aCountries;
-    }
-
-
     public function normalizeString($sTerm)
     {
         if ($this->oNormalizer === null) {
@@ -206,12 +199,7 @@ class Tokenizer
                     );
                 }
             } elseif ($aWord['country_code']) {
-                // Filter country tokens that do not match restricted countries.
-                if (!$this->aCountryRestriction
-                    || in_array($aWord['country_code'], $this->aCountryRestriction)
-                ) {
-                    $oToken = new Token\Country($iId, $aWord['country_code']);
-                }
+                $oToken = new Token\Country($iId, $aWord['country_code']);
             } elseif ($aWord['word_token'][0] == ' ') {
                 $oToken = new Token\Word(
                     $iId,