Skip to content

Addok plugin to support short city name as equal as full city name

License

Notifications You must be signed in to change notification settings

Mapotempo/addok_usage_name_BAN_FR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Addok usage_name_BAN_FR

Addok plugin to support short city name as equal as full city name.

Addressed problem

Some cities have composed names, some times long one, e.g. Adelans-et-le-Val-de-Bithaine. But long names are not in use in daily life.

Assuming autoclomplete as false. When you use the name of "Brive" in France you probably mean the city of "Brive-la-Gaillarde", but not the locality of "Brive" about the village of "Guenrouet".

Configuration

Add addok_usage_name_BAN_FR.make_labels in place of the default addok.helpers.results.make_labels or addok_france.make_labels.

SEARCH_RESULT_PROCESSORS_PYPATHS = [
    ...
    'addok_usage_name_BAN_FR.make_labels',
    ...

How it works

On query this plugin rewrite the result from Addok search by replacing each result label by possible subpart of the name splited on "-".

Example:

input: Adelans-et-le-Val-de-Bithaine
matchable output: Adelans-et-le-Val-de-Bithaine, Adelans-et-le-Val, Adelans

About

Addok plugin to support short city name as equal as full city name

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages