Skip to main content

Module profile

Module profile 

Source
Expand description

Country / language profiles.

The engine (index, collectors, scoring) is generic. Everything that depends on how addresses are written in a given country goes through a Profile: query cleanup, token processing (housenumber detection, synonyms, phonetics), result labels, indexed fields and filters.

Every method has a default mirroring core addok’s configuration; a country overrides only what it needs, like addok plugins do. The same profile must be used to build and to query an index: its name and version are stored in the index and checked when it is opened.

Modules§

be
Belgium. Names are indexed in every official language of their region (name, city lists, the region’s language first). The French processing applies to all of them (the same on index and query, so Dutch words are only normalized, never mismatched), with Dutch abbreviations and the Benelux housenumber and postcode handling.
default
Core addok behaviour, used as is by DefaultProfile and as building blocks by country profiles.
fr
France, configured like the address index of the Géoplateforme geocoder (IGN), which serves the BAN API: addok-fr 1.1.0 + addok-france 1.2.0 on addok 1.3, with indexes/address/config/addok.conf of geoplateforme/geocodage/geocodeur. The versions are inferred from the API behaviour (multi-value filters, labels for former municipalities, addok-fr 1.1 phonetics), the configuration is the published one.
lu
Luxembourg. Street names are mostly French, the others Luxembourgish or German compounds (“Kaesfurterstrooss”) that need no splitting: the French processing applies, with the Benelux housenumber and postcode handling. Labels follow the BD-Adresses: “20 Kaesfurterstrooss 9755 Hupperdange”.

Structs§

FieldSpec
An indexed text field (addok’s FIELDS).
Postal
A delivery line found in a query (Profile::postal), and where the place it stands for is.
PostalLine
A delivery line of the query, given back with the results as the user wrote it, normalized: “92074 PARIS LA DEFENSE CEDEX 12”. An address checked by the geocoder keeps it, even when the code is unknown.

Enums§

Boost
How much a field weighs in the token → document boost.

Traits§

Profile

Functions§

by_name
Profiles an index can be built with.
names
preprocess
Index-time text processing (addok.helpers.index.preprocess).
preprocess_query
Query-time text processing (addok.helpers.search.preprocess_query), on an already ASCII-folded query.