Skip to content

Mapotempo/addok_score_preprocessed_query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Addok Score Preprocessed Query

Addok plugin to score the result again the preprocessed query and not the original one.

Addressed problem

Address can contain oblivious mistake or garbage data we are able to clean on preprocessing step. But the scoring in Addok is make on the input query. With a same address result, longer is the input query, lesser is the score.

Clean address

query=7 Rue de la Bergerie, Salleboeuf

"geocoding": {
  "score": 0.9112636363636362,
  "type": "house",
  "name": "7 Rue de la Bergerie",
}

With garbage

query=7 Rue de la Bergerie (passer par l'arrière), Salleboeuf

"geocoding": {
  "score": 0.5369320855614973,
  "type": "house",
  "name": "7 Rue de la Bergerie",
}

Configuration

Add addok_score_preprocessed_query.score_preprocessed_query in first place into SEARCH_RESULT_PROCESSORS_PYPATHS.

SEARCH_RESULT_PROCESSORS_PYPATHS = [
    'addok_score_preprocessed_query.score_preprocessed_query',
    ...

How it works

It replaces the query by the preprocessed one just before scoring the result.

About

Addok plugin to score the result agains the preprocessed query and not the original one

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages