Skip to content
This repository has been archived by the owner on Mar 3, 2025. It is now read-only.

Commit

Permalink
Correction de la recherche phonétique avec la lettre H
Browse files Browse the repository at this point in the history
  • Loading branch information
Noethys committed Nov 26, 2024
1 parent 891ccb3 commit d46e78b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions noethysweb/individus/views/recherche_avancee.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def post(self, request, **kwargs):
# Recherche textuelle
if form.cleaned_data["type_recherche"] == "PHONETIQUE":
if jellyfish.soundex(valeur_recherche) == jellyfish.soundex(valeur_individu):
if valeur_recherche.startswith("H"): valeur_recherche = valeur_recherche[1:]
if valeur_individu.startswith("H"): valeur_individu = valeur_individu[1:]
score += 1 + jellyfish.jaro_distance(valeur_recherche.lower(), valeur_individu.lower())

# Recherche phonétique
Expand Down

0 comments on commit d46e78b

Please sign in to comment.