]> git.openstreetmap.org Git - nominatim.git/blob - settings/icu_tokenizer.yaml
docs: update Update docs for virtualenv use
[nominatim.git] / settings / icu_tokenizer.yaml
1 query-preprocessing:
2     - step: normalize
3 normalization:
4     - ":: lower ()"
5     - ":: Hans-Hant"
6     - !include icu-rules/unicode-digits-to-decimal.yaml
7     - "'№' > 'no'"
8     - "'n°' > 'no'"
9     - "'nº' > 'no'"
10     - "ª > a"
11     - "º > o"
12     - "[[:Punctuation:][:Symbol:]\u02bc]  > ' '"
13     - "ß > 'ss'" # German szet is unambiguously equal to double ss
14     - "[^[:alnum:] [:Canonical_Combining_Class=Virama:] [:Space:]] >"
15     - "[:Lm:] >"
16     - ":: [[:Number:]] Latin ()"
17     - ":: [[:Number:]] Ascii ();"
18     - ":: [[:Number:]] NFD ();"
19     - "[[:Nonspacing Mark:] [:Cf:]] >;"
20     - "[:Space:]+ > ' '"
21 transliteration:
22     - ":: Latin ()"
23     - !include icu-rules/extended-unicode-to-asccii.yaml
24     - ":: Ascii ()"
25     - ":: NFD ()"
26     - ":: lower ()"
27     - "[^a-z0-9[:Space:]] >"
28     - ":: NFC ()"
29     - "[:Space:]+ > ' '"
30 sanitizers:
31     - step: clean-housenumbers
32       filter-kind:
33         - housenumber
34         - conscriptionnumber
35         - streetnumber
36       convert-to-name:
37         - (\A|.*,)[^\d,]{3,}(,.*|\Z)
38     - step: clean-postcodes
39       convert-to-address: yes
40       default-pattern: "[A-Z0-9- ]{3,12}"
41     - step: clean-tiger-tags
42     - step: split-name-list
43       delimiters: ;
44     - step: strip-brace-terms
45     - step: tag-analyzer-by-language
46       filter-kind: [".*name.*"]
47       whitelist: [bg,ca,cs,da,de,el,en,es,et,eu,fi,fr,gl,hu,it,ja,mg,ms,nl,no,pl,pt,ro,ru,sk,sl,sv,tr,uk,vi]
48       use-defaults: all
49       mode: append
50     - step: tag-japanese
51 token-analysis:
52     - analyzer: generic
53     - id: "@housenumber"
54       analyzer: housenumbers
55     - id: "@postcode"
56       analyzer: postcodes
57     - id: bg
58       analyzer: generic
59       mode: variant-only
60       variants:
61           - !include icu-rules/variants-bg.yaml
62     - id: ca
63       analyzer: generic
64       mode: variant-only
65       variants:
66           - !include icu-rules/variants-ca.yaml
67     - id: cs
68       analyzer: generic
69       mode: variant-only
70       variants:
71           - !include icu-rules/variants-cs.yaml
72     - id: da
73       analyzer: generic
74       mode: variant-only
75       variants:
76           - !include icu-rules/variants-da.yaml
77     - id: de
78       analyzer: generic
79       mode: variant-only
80       variants:
81           - !include icu-rules/variants-de.yaml
82       mutations:
83           - pattern: ä
84             replacements: ["ä", "ae"]
85           - pattern: ö
86             replacements: ["ö", "oe"]
87           - pattern: ü
88             replacements: ["ü", "ue"]
89     - id: el
90       analyzer: generic
91       mode: variant-only
92       variants:
93           - !include icu-rules/variants-el.yaml
94     - id: en
95       analyzer: generic
96       mode: variant-only
97       variants:
98           - !include icu-rules/variants-en.yaml
99     - id: es
100       analyzer: generic
101       mode: variant-only
102       variants:
103           - !include icu-rules/variants-es.yaml
104     - id: et
105       analyzer: generic
106       mode: variant-only
107       variants:
108           - !include icu-rules/variants-et.yaml
109     - id: eu
110       analyzer: generic
111       mode: variant-only
112       variants:
113           - !include icu-rules/variants-eu.yaml
114     - id: fi
115       analyzer: generic
116       mode: variant-only
117       variants:
118           - !include icu-rules/variants-fi.yaml
119     - id: fr
120       analyzer: generic
121       mode: variant-only
122       variants:
123           - !include icu-rules/variants-fr.yaml
124     - id: gl
125       analyzer: generic
126       mode: variant-only
127       variants:
128           - !include icu-rules/variants-gl.yaml
129     - id: hu
130       analyzer: generic
131       mode: variant-only
132       variants:
133           - !include icu-rules/variants-hu.yaml
134     - id: it
135       analyzer: generic
136       mode: variant-only
137       variants:
138           - !include icu-rules/variants-it.yaml
139     - id: ja
140       analyzer: generic
141       mode: variant-only
142       variants:
143           - !include icu-rules/variants-ja.yaml
144     - id: mg
145       analyzer: generic
146       mode: variant-only
147       variants:
148           - !include icu-rules/variants-mg.yaml
149     - id: ms
150       analyzer: generic
151       mode: variant-only
152       variants:
153           - !include icu-rules/variants-ms.yaml
154     - id: nl
155       analyzer: generic
156       mode: variant-only
157       variants:
158           - !include icu-rules/variants-nl.yaml
159     - id: no
160       analyzer: generic
161       mode: variant-only
162       variants:
163           - !include icu-rules/variants-no.yaml
164     - id: pl
165       analyzer: generic
166       mode: variant-only
167       variants:
168           - !include icu-rules/variants-pl.yaml
169     - id: pt
170       analyzer: generic
171       mode: variant-only
172       variants:
173           - !include icu-rules/variants-pt.yaml
174     - id: ro
175       analyzer: generic
176       mode: variant-only
177       variants:
178           - !include icu-rules/variants-ro.yaml
179     - id: ru
180       analyzer: generic
181       mode: variant-only
182       variants:
183           - !include icu-rules/variants-ru.yaml
184     - id: sk
185       analyzer: generic
186       mode: variant-only
187       variants:
188           - !include icu-rules/variants-sk.yaml
189     - id: sl
190       analyzer: generic
191       mode: variant-only
192       variants:
193           - !include icu-rules/variants-sl.yaml
194     - id: sv
195       analyzer: generic
196       mode: variant-only
197       variants:
198           - !include icu-rules/variants-sv.yaml
199     - id: tr
200       analyzer: generic
201       mode: variant-only
202       variants:
203           - !include icu-rules/variants-tr.yaml
204     - id: uk
205       analyzer: generic
206       mode: variant-only
207       variants:
208           - !include icu-rules/variants-uk.yaml
209     - id: vi
210       analyzer: generic
211       mode: variant-only
212       variants:
213           - !include icu-rules/variants-vi.yaml