fix(codev): algo Solution tokenize direct + seuils releves + fiches demo enrichies

This commit is contained in:
Jules Neny
2026-05-06 21:28:27 +02:00
parent e7c7d302ea
commit 6f7d2450de
2 changed files with 75 additions and 71 deletions

View File

@@ -73,98 +73,93 @@
import type { CodevFiche, CodevMatch } from '~/types/codev'
import { computeMatches } from '~/utils/codev/matching'
// 10 fiches factices - hashtags alignes pour demontrer les 3 modes :
// 10 fiches sans hashtags — textes enrichis pour que scoreDirect discrimine bien les 3 modes :
//
// Solution : Lea(besoin coaching) -> Maya(offre coaching)
// Sami(besoin formation+vente) -> Ines(offre vente+formation)
// Tom(besoin tiers-lieu) -> Zoe(offre facilitation+tiers-lieu)
// Solution (scoreDirect besoinA vs offreB) :
// Sami(besoin vendre formation) -> Ines(offre vente formations) ✓
// Nael(besoin site web formation) -> Sami(offre developpement web) ✓
// Eva(besoin coaching vente) -> Ines(offre vente formations) ✓
// Tom(besoin tiers-lieu) -> Zoe(offre facilitation tiers-lieux) ✓
//
// Alliance : Lea + Maya (hashtag coaching commun dans besoins)
// Sami + Kenji (hashtag formation+vente dans besoins)
// Tom + Zoe (hashtag tiers-lieu dans besoins)
// Alliance (besoins similaires) :
// Lea + Maya (coaching, lancer, offre) ✓
// Tom + Zoe (tiers-lieu, co-creer) ✓
// Sami + Kenji (vendre, formations) ✓
//
// Surprise : Lea + Zoe (hashtag facilitation dans offres)
// Tom + Roman (hashtag archi dans offres)
// Surprise (offres similaires) :
// Lea + Zoe (facilitation, groupes)
// Tom + Roman (architecture) ✓
// Ines + Nael (marketing, formations) ✓
const FICHES_DEMO: CodevFiche[] = [
{
id: 1,
nom: 'Lea',
besoin: 'Structurer mon offre de coaching pour la lancer en septembre',
offre: 'Animation de groupes, facilitation de cercles de parole',
hashtags: ['coaching', 'facilitation'],
id: 1, nom: 'Lea',
besoin: 'Structurer et lancer mon offre de coaching professionnel cet automne',
offre: 'Facilitation de groupes et animation de cercles de parole',
hashtags: [],
created_at: '2026-05-08T10:00:00Z',
},
{
id: 2,
nom: 'Sami',
besoin: 'Comprendre comment vendre une formation en ligne',
offre: 'Developpement web, sites Astro et Nuxt',
hashtags: ['formation', 'vente'],
id: 2, nom: 'Sami',
besoin: 'Vendre ma formation en ligne et attirer mes premiers clients',
offre: 'Developpement web sur mesure, creation de sites et applications',
hashtags: [],
created_at: '2026-05-08T10:01:00Z',
},
{
id: 3,
nom: 'Ines',
besoin: 'Aide pour la facilitation de mes ateliers ecriture',
offre: 'Vente de formations en ligne, marketing direct',
hashtags: ['vente', 'formation'],
id: 3, nom: 'Ines',
besoin: 'Ameliorer la facilitation de mes ateliers collaboratifs',
offre: 'Vente de formations en ligne et marketing pour formateurs',
hashtags: [],
created_at: '2026-05-08T10:02:00Z',
},
{
id: 4,
nom: 'Tom',
besoin: 'Trouver un associe pour un projet de tiers-lieu',
offre: 'Architecture eco-responsable, conception bioclimatique',
hashtags: ['tiers-lieu', 'archi'],
id: 4, nom: 'Tom',
besoin: 'Trouver des associes pour co-creer un tiers-lieu rural',
offre: 'Architecture bioclimatique et eco-construction pour tiers-lieux',
hashtags: [],
created_at: '2026-05-08T10:03:00Z',
},
{
id: 5,
nom: 'Maya',
besoin: 'Structurer mon offre de coaching freelance',
offre: 'Coaching de carriere, accompagnement transition pro',
hashtags: ['coaching', 'carriere'],
id: 5, nom: 'Maya',
besoin: 'Creer et lancer mon offre de coaching en transition professionnelle',
offre: 'Accompagnement coaching de carriere et transitions professionnelles',
hashtags: [],
created_at: '2026-05-08T10:04:00Z',
},
{
id: 6,
nom: 'Kenji',
besoin: 'Apprendre a vendre mes formations sans me sentir vendeur',
offre: 'Photographie, direction artistique de projets editoriaux',
hashtags: ['formation', 'vente'],
id: 6, nom: 'Kenji',
besoin: 'Apprendre a vendre mes formations sans pression commerciale',
offre: 'Photographie professionnelle et direction artistique editoriale',
hashtags: [],
created_at: '2026-05-08T10:05:00Z',
},
{
id: 7,
nom: 'Zoe',
besoin: 'Trouver des associes pour mon projet de tiers-lieu rural',
offre: 'Animation et facilitation de collectifs, intelligence collective',
hashtags: ['tiers-lieu', 'facilitation'],
id: 7, nom: 'Zoe',
besoin: 'Co-creer un tiers-lieu avec des porteurs de projet alignes',
offre: 'Facilitation de collectifs et animation en intelligence collective',
hashtags: [],
created_at: '2026-05-08T10:06:00Z',
},
{
id: 8,
nom: 'Nael',
besoin: 'Construire un site web pour ma formation',
offre: 'Strategie marketing, lancement de produits digitaux',
hashtags: ['web', 'strategie'],
id: 8, nom: 'Nael',
besoin: 'Creer un site web pour presenter et vendre ma formation',
offre: 'Strategie marketing digital et lancement de produits en ligne',
hashtags: [],
created_at: '2026-05-08T10:07:00Z',
},
{
id: 9,
nom: 'Eva',
besoin: 'Lancer mon offre de coaching avec une page de vente',
offre: 'Ecriture longue forme, articles essais et tribunes',
hashtags: ['coaching', 'ecriture'],
id: 9, nom: 'Eva',
besoin: 'Lancer mon coaching avec une page de vente qui convertit',
offre: 'Ecriture longue forme, articles de fond et tribunes editoriales',
hashtags: [],
created_at: '2026-05-08T10:08:00Z',
},
{
id: 10,
nom: 'Roman',
besoin: 'Ameliorer mes articles de blog sur la renovation',
offre: 'Architecture, plans techniques pour renovation energetique',
hashtags: ['archi', 'reno'],
id: 10, nom: 'Roman',
besoin: 'Ecrire de meilleurs articles pour mon blog et ma newsletter',
offre: 'Architecture technique et plans pour renovation energetique',
hashtags: [],
created_at: '2026-05-08T10:09:00Z',
},
]
@@ -186,7 +181,7 @@ function setMode(newMode: typeof mode.value) {
if (newMode === 'none') {
matches.value = []
} else {
matches.value = computeMatches(fiches.value, newMode)
matches.value = computeMatches(fiches.value, newMode, 0.12)
}
}
</script>