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