]> git.openstreetmap.org Git - nominatim.git/blob - settings/icu_tokenizer.yaml
add sanitizer for TIGER tags
[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 unambiguously equal to double ss
12     - "[^[:alnum:] [:Canonical_Combining_Class=Virama:] [: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: clean-housenumbers
29       filter-kind:
30         - housenumber
31         - conscriptionnumber
32         - streetnumber
33       convert-to-name:
34         - (\A|.*,)[^\d,]{3,}(,.*|\Z)
35     - step: clean-postcodes
36       convert-to-address: yes
37       default-pattern: "[A-Z0-9- ]{3,12}"
38     - step: clean-tiger-tags
39     - step: split-name-list
40     - step: strip-brace-terms
41     - step: tag-analyzer-by-language
42       filter-kind: [".*name.*"]
43       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]
44       use-defaults: all
45       mode: append
46 token-analysis:
47     - analyzer: generic
48     - id: "@housenumber"
49       analyzer: housenumbers
50     - id: "@postcode"
51       analyzer: postcodes
52     - id: bg
53       analyzer: generic
54       mode: variant-only
55       variants:
56           - !include icu-rules/variants-bg.yaml
57     - id: ca
58       analyzer: generic
59       mode: variant-only
60       variants:
61           - !include icu-rules/variants-ca.yaml
62     - id: cs
63       analyzer: generic
64       mode: variant-only
65       variants:
66           - !include icu-rules/variants-cs.yaml
67     - id: da
68       analyzer: generic
69       mode: variant-only
70       variants:
71           - !include icu-rules/variants-da.yaml
72     - id: de
73       analyzer: generic
74       mode: variant-only
75       variants:
76           - !include icu-rules/variants-de.yaml
77       mutations:
78           - pattern: ä
79             replacements: ["ä", "ae"]
80           - pattern: ö
81             replacements: ["ö", "oe"]
82           - pattern: ü
83             replacements: ["ü", "ue"]
84     - id: el
85       analyzer: generic
86       mode: variant-only
87       variants:
88           - !include icu-rules/variants-el.yaml
89     - id: en
90       analyzer: generic
91       mode: variant-only
92       variants:
93           - !include icu-rules/variants-en.yaml
94     - id: es
95       analyzer: generic
96       mode: variant-only
97       variants:
98           - !include icu-rules/variants-es.yaml
99     - id: et
100       analyzer: generic
101       mode: variant-only
102       variants:
103           - !include icu-rules/variants-et.yaml
104     - id: eu
105       analyzer: generic
106       mode: variant-only
107       variants:
108           - !include icu-rules/variants-eu.yaml
109     - id: fi
110       analyzer: generic
111       mode: variant-only
112       variants:
113           - !include icu-rules/variants-fi.yaml
114     - id: fr
115       analyzer: generic
116       mode: variant-only
117       variants:
118           - !include icu-rules/variants-fr.yaml
119     - id: gl
120       analyzer: generic
121       mode: variant-only
122       variants:
123           - !include icu-rules/variants-gl.yaml
124     - id: hu
125       analyzer: generic
126       mode: variant-only
127       variants:
128           - !include icu-rules/variants-hu.yaml
129     - id: it
130       analyzer: generic
131       mode: variant-only
132       variants:
133           - !include icu-rules/variants-it.yaml
134     - id: ja
135       analyzer: generic
136       mode: variant-only
137       variants:
138           - !include icu-rules/variants-ja.yaml
139     - id: mg
140       analyzer: generic
141       mode: variant-only
142       variants:
143           - !include icu-rules/variants-mg.yaml
144     - id: ms
145       analyzer: generic
146       mode: variant-only
147       variants:
148           - !include icu-rules/variants-ms.yaml
149     - id: nl
150       analyzer: generic
151       mode: variant-only
152       variants:
153           - !include icu-rules/variants-nl.yaml
154     - id: no
155       analyzer: generic
156       mode: variant-only
157       variants:
158           - !include icu-rules/variants-no.yaml
159     - id: pl
160       analyzer: generic
161       mode: variant-only
162       variants:
163           - !include icu-rules/variants-pl.yaml
164     - id: pt
165       analyzer: generic
166       mode: variant-only
167       variants:
168           - !include icu-rules/variants-pt.yaml
169     - id: ro
170       analyzer: generic
171       mode: variant-only
172       variants:
173           - !include icu-rules/variants-ro.yaml
174     - id: ru
175       analyzer: generic
176       mode: variant-only
177       variants:
178           - !include icu-rules/variants-ru.yaml
179     - id: sk
180       analyzer: generic
181       mode: variant-only
182       variants:
183           - !include icu-rules/variants-sk.yaml
184     - id: sl
185       analyzer: generic
186       mode: variant-only
187       variants:
188           - !include icu-rules/variants-sl.yaml
189     - id: sv
190       analyzer: generic
191       mode: variant-only
192       variants:
193           - !include icu-rules/variants-sv.yaml
194     - id: tr
195       analyzer: generic
196       mode: variant-only
197       variants:
198           - !include icu-rules/variants-tr.yaml
199     - id: uk
200       analyzer: generic
201       mode: variant-only
202       variants:
203           - !include icu-rules/variants-uk.yaml
204     - id: vi
205       analyzer: generic
206       mode: variant-only
207       variants:
208           - !include icu-rules/variants-vi.yaml