13/06/23 - 16h

master
cherif 2023-06-13 16:39:11 +02:00
parent b5978e2286
commit 3d80369803
5 changed files with 4337 additions and 8 deletions

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="06/06/23 - 19h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="08/06/23 - 21h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Ela_Spacy.py" beforeDir="false" afterPath="$PROJECT_DIR$/Ela_Spacy.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ela_factures_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/ela_factures_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/strype_payement.py" beforeDir="false" afterPath="$PROJECT_DIR$/strype_payement.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ela_index_bdd_classes.py" beforeDir="false" afterPath="$PROJECT_DIR$/ela_index_bdd_classes.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -300,7 +301,14 @@
<option name="project" value="LOCAL" />
<updated>1686072292768</updated>
</task>
<option name="localTasksCounter" value="34" />
<task id="LOCAL-00034" summary="08/06/23 - 21h">
<created>1686251029490</created>
<option name="number" value="00034" />
<option name="presentableId" value="LOCAL-00034" />
<option name="project" value="LOCAL" />
<updated>1686251029490</updated>
</task>
<option name="localTasksCounter" value="35" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -315,7 +323,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="15/04/23 - 22h" />
<MESSAGE value="20/04/23 - 16h" />
<MESSAGE value="20/04/23 - 20h" />
<MESSAGE value="22/04/23 - 19h" />
@ -340,6 +347,7 @@
<MESSAGE value="02/06/23 - 22h" />
<MESSAGE value="05/06/23 - 15h" />
<MESSAGE value="06/06/23 - 19h" />
<option name="LAST_COMMIT_MESSAGE" value="06/06/23 - 19h" />
<MESSAGE value="08/06/23 - 21h" />
<option name="LAST_COMMIT_MESSAGE" value="08/06/23 - 21h" />
</component>
</project>

View File

@ -433,7 +433,7 @@ def ela_index_record_field(lines, class_id, source_field = ""):
'''
## Suppression de toutes les indexation qui existe de cette formation
'''
lines = mycommon.cleanhtml(lines)
coll_name = MYSY_GV.dbname['elaindex']
coll_name_StopWord = MYSY_GV.dbname['mysystopwords']

File diff suppressed because one or more lines are too long

View File

@ -29,6 +29,7 @@ def ela_index_class(external_code="", source_field = ""):
# Indexation par defaut : champs TITRE + DESCRIPTION
if ( str(source_field) == "default" ):
chaine = doc["title"]+" - "+doc["description"]
chaine = mycommon.cleanhtml(chaine)
#mycommon.myprint(" external_code = "+str(doc["external_code"])+" ==> "+str(chaine))
retval = ls.ela_index_record_field(chaine, str(doc["external_code"]), source_field)
@ -55,6 +56,7 @@ def ela_index_class(external_code="", source_field = ""):
# Indexation du champ : title
elif ( str(source_field) == "title" ):
chaine = doc["title"]
chaine = mycommon.cleanhtml(chaine)
# mycommon.myprint(" external_code = "+str(doc["external_code"])+" ==> "+str(chaine))
retval = ls.ela_index_record_field(chaine, str(doc["external_code"]), source_field)
@ -81,6 +83,7 @@ def ela_index_class(external_code="", source_field = ""):
# Indexation du champ : description
elif ( str(source_field) == "description" ):
chaine = doc["description"]
chaine = mycommon.cleanhtml(chaine)
# mycommon.myprint(" external_code = "+str(doc["external_code"])+" ==> "+str(chaine))
retval = ls.ela_index_record_field(chaine, str(doc["external_code"]), source_field)
@ -108,6 +111,7 @@ def ela_index_class(external_code="", source_field = ""):
# Indexation du champ : Objectif
elif ( str(source_field) == "objectif" ):
chaine = doc["objectif"]
chaine = mycommon.cleanhtml(chaine)
# mycommon.myprint(" external_code = "+str(doc["external_code"])+" ==> "+str(chaine))
retval = ls.ela_index_record_field(chaine, str(doc["external_code"]), source_field)
@ -135,6 +139,7 @@ def ela_index_class(external_code="", source_field = ""):
# Indexation du champ : mot_cle
elif (str(source_field) == "keyword"):
chaine = doc["mots_cle"]
chaine = mycommon.cleanhtml(chaine)
# mycommon.myprint(" external_code = "+str(doc["external_code"])+" ==> "+str(chaine))
retval = ls.ela_index_record_field(chaine, str(doc["external_code"]), source_field)
@ -161,6 +166,7 @@ def ela_index_class(external_code="", source_field = ""):
# Indexation du champ : video_text , donc la transcription d'une video
elif (str(source_field) == "video_text"):
chaine = doc["video_text"]
chaine = mycommon.cleanhtml(chaine)
# mycommon.myprint(" external_code = "+str(doc["external_code"])+" ==> "+str(chaine))
retval = ls.ela_index_record_field(chaine, str(doc["external_code"]), source_field)
@ -238,7 +244,8 @@ def ela_index_class_key_word(external_code="", source_field = ""):
Ajouter les mots dans la collection word_not_stem
"""
cpt = 0
list_keyword = str(local_class['mots_cle']).replace(",",";").split(";")
list_mots_cle = mycommon.cleanhtml(local_class['mots_cle'])
list_keyword = str(list_mots_cle).replace(",",";").split(";")
for val in list_keyword :
if(len(str(val).strip()) > 0 ):
cpt = cpt + 1

View File

@ -2824,6 +2824,8 @@ def cleanhtml(raw_html):
CLEANR = re.compile('<.*?>')
cleantext = re.sub(CLEANR, '', raw_html).replace("&nbsp;", "")
cleantext = html.unescape(str(cleantext))
cleantext = clean_emoji(str(cleantext))
return cleantext
"""