forked from osm-search/Nominatim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Black/whitelisting for special phrases
Allows to restrict the special phrases imported from the wiki. Blacklist allows to exclude certain class/type combinations. Whitelist allows to define an allowed subset of types for a class. Adjust to your liking in settings/phrase_settings.php before running the specialphrases script.
- Loading branch information
Showing
2 changed files
with
63 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
# These settings control the import of special phrases from the wiki. | ||
|
||
# Languages to download the special phrases for. | ||
$aLanguageIn = array( | ||
'af', | ||
'ar', | ||
'br', | ||
'ca', | ||
'cs', | ||
'de', | ||
'en', | ||
'es', | ||
'et', | ||
'eu', | ||
'fa', | ||
'fi', | ||
'fr', | ||
'gl', | ||
'hr', | ||
'hu', | ||
'ia', | ||
'is', | ||
'it', | ||
'ja', | ||
'mk', | ||
'nl', | ||
'no', | ||
'pl', | ||
'ps', | ||
'pt', | ||
'ru', | ||
'sk', | ||
'sv', | ||
'uk', | ||
'vi', | ||
); | ||
|
||
# class/type combinations to exclude | ||
$aTagsBlacklist = array( | ||
'boundary' => array('administrative'), | ||
'place' => array('house', 'houses'), | ||
); | ||
# If a class is in the white list then all types will | ||
# be ignored except the ones given in the list. | ||
# Also use this list to exclude an entire class from | ||
# special phrases. | ||
$aTagsWhitelist = array( | ||
'highway' => array('bus_stop', 'rest_area', 'raceway'), | ||
'building' => array(), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters