feat(search): add exact company aliases

Embed a versioned local alias overlay and rank exact aliases before legal-name matches and word prefixes. Normalize Unicode consistently, deduplicate by company identity before limiting, and update bilingual search guidance and tests.

Refs #24

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 18:08:35 +01:00
parent 64a7124889
commit f7b057efa3
13 changed files with 413 additions and 43 deletions

View File

@ -9,10 +9,10 @@ import { Select } from '@/components/ui/select'
const copy = {
fr: {
title: 'Entreprises suivies', intro: 'Recherchez une entreprise par son nom, choisissez le bon résultat puis suivez-la. Aucune synthèse n’est générée automatiquement.',
searchTitle: 'Rechercher une entreprise', query: "Nom de l'entreprise", search: 'Rechercher',
help: 'La recherche se lance au clic sur Rechercher ou avec Entrée. Jusqu’à 20 résultats, sans sélection automatique.',
searchTitle: 'Rechercher une entreprise', query: 'Nom ou nom courant de l’entreprise', search: 'Rechercher',
help: 'Saisissez le nom ou le nom courant d’une entreprise, par exemple Intel ou IBM. La recherche se lance au clic sur Rechercher ou avec Entrée. Jusqu’à 20 résultats, sans sélection automatique.',
results: 'Résultats des entreprises', before: 'Saisissez le nom d’une entreprise, puis lancez la recherche.',
searching: 'Recherche en cours…', empty: 'Aucune entreprise trouvée. Essayez un autre nom.',
searching: 'Recherche en cours…', empty: 'Aucune entreprise trouvée. Essayez un autre nom ou nom courant, par exemple Intel ou IBM.',
quota: 'Quota de recherche atteint. Réessayez plus tard.', timeout: 'Le délai de recherche est dépassé. Vous pouvez relancer la recherche.',
unavailable: 'Le service de recherche est indisponible. Réessayez plus tard.', searchError: 'Impossible de rechercher des entreprises. Vous pouvez relancer la recherche.',
retry: 'Réessayer', follow: 'Suivre cette entreprise', tracked: 'Déjà suivie', unfollow: 'Ne plus suivre',
@ -27,9 +27,9 @@ const copy = {
},
en: {
title: 'Followed companies', intro: 'Search for a company by name, choose the correct result, then follow it. No summary is generated automatically.',
searchTitle: 'Search for a company', query: 'Company name', search: 'Search',
help: 'Search by clicking Search or pressing Enter. Up to 20 results, with no automatic selection.',
results: 'Company results', before: 'Enter a company name, then search.', searching: 'Searching…', empty: 'No company found. Try another name.',
searchTitle: 'Search for a company', query: 'Company name or commonly used name', search: 'Search',
help: 'Enter a company name or commonly used name, such as Intel or IBM. Search by clicking Search or pressing Enter. Up to 20 results, with no automatic selection.',
results: 'Company results', before: 'Enter a company name, then search.', searching: 'Searching…', empty: 'No company found. Try another name or commonly used name, such as Intel or IBM.',
quota: 'Search quota reached. Please try again later.', timeout: 'The search timed out. You can search again.',
unavailable: 'The search service is unavailable. Please try again later.', searchError: 'Unable to search for companies. You can search again.',
retry: 'Try again', follow: 'Follow this company', tracked: 'Already followed', unfollow: 'Unfollow',