3 ## Importing OSM user-maintained special phrases
5 As described in the [Import section](../admin/Import.md), it is possible to
6 import special phrases from the wiki with the following command:
9 nominatim special-phrases --import-from-wiki
12 ## Importing custom special phrases
14 Special phrases may also be imported from any custom CSV file. The file needs
15 to have a header line, use comma as delimiter and define the following
18 * **phrase**: the keyword to look for
19 * **class**: key of the main tag of the place to find
20 (see [principal tags in import style](Import-Styles.md#set_main_tags-principal-tags)
21 * **type**: value of the main tag
22 * **operator**: type of special phrase, may be one of:
23 * *in*: place is within the place defined by the search term (e.g. "_Hotels in_ Berlin")
24 * *near*: place is near the place defined by the search term (e.g. "_bus stops near_ Big Ben")
25 * *named*: special phrase is a classifier (e.g. "_hotel_ California")
26 * *-*: unspecified, can be any of the above
28 If the file contains any other columns, then they are silently ignored
30 To import the CSV file, use the following command:
33 nominatim special-phrases --import-from-csv <csv file>
36 Note that the two previous import commands will update the phrases from your database.
37 This means that if you import some phrases from a CSV file, only the phrases
38 present in the CSV file will be kept in the database. All other phrases will
41 If you want to only add new phrases and not update the other ones you can add
42 the argument `--no-replace` to the import command. For example:
45 nominatim special-phrases --import-from-csv <csv file> --no-replace
48 This will add the phrases present in the CSV file into the database without
49 removing the other ones.