05/05/22 - 15h30
parent
975921a9a6
commit
d4c58eaebb
|
@ -1,4 +1,13 @@
|
||||||
,index,mots,occurence,moyenne,id_formation,source_field
|
,index,mots,occurence,moyenne,id_formation,source_field
|
||||||
0,0,fondamentau,1,0.33,8866,title
|
0,0,regle,1,0.08,8866,objectif
|
||||||
1,1,publique,1,0.33,8866,title
|
1,1,publique,1,0.08,8866,objectif
|
||||||
2,2,comptabilite,1,0.33,8866,title
|
2,2,constante,1,0.08,8866,objectif
|
||||||
|
3,3,impose,1,0.08,8866,objectif
|
||||||
|
4,4,maitriser,1,0.08,8866,objectif
|
||||||
|
5,5,evolution,1,0.08,8866,objectif
|
||||||
|
6,6,comptabilite,1,0.08,8866,objectif
|
||||||
|
7,7,appliquer,1,0.08,8866,objectif
|
||||||
|
8,8,principe,1,0.08,8866,objectif
|
||||||
|
9,9,objectif,1,0.08,8866,objectif
|
||||||
|
10,10,reglementation,1,0.08,8866,objectif
|
||||||
|
11,11,formation,1,0.08,8866,objectif
|
||||||
|
|
|
|
@ -594,23 +594,23 @@ def mysy_recherche_levenshtein(tab_mot):
|
||||||
|
|
||||||
for x in coll_name.find({'mots': v}):
|
for x in coll_name.find({'mots': v}):
|
||||||
cmp_levenshtein = int(mycommon.levenshtein(mot, str(x['mots'])))
|
cmp_levenshtein = int(mycommon.levenshtein(mot, str(x['mots'])))
|
||||||
|
print(" check ### ="+str(x['mots']))
|
||||||
|
|
||||||
|
if( len(mot) <= 5 and cmp_levenshtein <= 1):
|
||||||
|
if( str(x['mots']) not in training_mots):
|
||||||
|
training_mots.append( str(x['mots']) )
|
||||||
|
|
||||||
if( len(mot) <= 5 and cmp_levenshtein <= 1):
|
elif( len(mot) <= 10 and cmp_levenshtein <= 2):
|
||||||
if( str(x['mots']) not in training_mots):
|
if( str(x['mots']) not in training_mots):
|
||||||
training_mots.append( str(x['mots']) )
|
training_mots.append( str(x['mots']) )
|
||||||
|
|
||||||
elif( len(mot) <= 10 and cmp_levenshtein <= 2):
|
elif ( cmp_levenshtein <= 3):
|
||||||
if( str(x['mots']) not in training_mots):
|
if (str(x['mots']) not in training_mots):
|
||||||
training_mots.append( str(x['mots']) )
|
training_mots.append(str(x['mots']))
|
||||||
|
|
||||||
elif ( cmp_levenshtein <= 3):
|
elif (cmp_levenshtein > 3):
|
||||||
if (str(x['mots']) not in training_mots):
|
print(" KOO cmp_levenshtein : " + mot + " CMP " + str(x['mots']) + " = " + str(cmp_levenshtein) +
|
||||||
training_mots.append(str(x['mots']))
|
" ==> id_formation" + str(x['id_formation']) + " ==> occurrence = " + str(x['occurence']))
|
||||||
|
|
||||||
elif (cmp_levenshtein > 3):
|
|
||||||
print(" KOO cmp_levenshtein : " + mot + " CMP " + str(x['mots']) + " = " + str(cmp_levenshtein) +
|
|
||||||
" ==> id_formation" + str(x['id_formation']) + " ==> occurrence = " + str(x['occurence']))
|
|
||||||
|
|
||||||
|
|
||||||
return True, training_mots
|
return True, training_mots
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
mots occurence moyenne id_formation source_field
|
mots occurence moyenne id_formation source_field
|
||||||
0 fondamentau 1 0.33 8866 title
|
0 regle 1 0.08 8866 objectif
|
||||||
1 publique 1 0.33 8866 title
|
1 publique 1 0.08 8866 objectif
|
||||||
2 comptabilite 1 0.33 8866 title
|
2 constante 1 0.08 8866 objectif
|
||||||
|
3 impose 1 0.08 8866 objectif
|
||||||
|
4 maitriser 1 0.08 8866 objectif
|
||||||
|
5 evolution 1 0.08 8866 objectif
|
||||||
|
6 comptabilite 1 0.08 8866 objectif
|
||||||
|
7 appliquer 1 0.08 8866 objectif
|
||||||
|
8 principe 1 0.08 8866 objectif
|
||||||
|
9 objectif 1 0.08 8866 objectif
|
||||||
|
10 reglementation 1 0.08 8866 objectif
|
||||||
|
11 formation 1 0.08 8866 objectif
|
Loading…
Reference in New Issue