]> git.openstreetmap.org Git - nominatim.git/blob - docs/customize/Query-Preprocessing.md
prepare release 5.3.2.post7
[nominatim.git] / docs / customize / Query-Preprocessing.md
1 # Query preprocessing
2
3 The query preprocessing step allows to transform the incoming query before
4 it is processed by the tokenizer. This includes removing unrelated parts,
5 rephrasing and phrase tagging.
6
7 ## Configuration
8
9 Query preprocessing is defined in the 'query_preprocessing.yaml' configuration
10 file. The file must contain a list of steps. Each step has a mandatory
11 parameter `step` which defines the type of preprocessor. Additional step
12 configuration may then be set with additional parameters.
13
14 The steps are executed in the order that they are defined in the configuration
15 file. Order matters here: each preprocessor works with the output of the previous
16 step.
17
18 ## Pre-defined preprocessors
19
20 The following is a list of preprocessors that are shipped with Nominatim.
21 To learn how to define custom preprocessors, see the section on
22 [query processing modules](../develop/Query-Processing-Modules.md).
23
24 ### split-japanese-phrases
25
26 ::: nominatim_api.query_preprocessing.split_japanese_phrases
27     options:
28         members: False
29         heading_level: 6
30         docstring_section_style: spacy
31
32 ### regex-replace
33
34 ::: nominatim_api.query_preprocessing.regex_replace
35     options:
36         members: False
37         heading_level: 6
38         docstring_section_style: spacy
39