MAJ V4.2.2

Améloration de la rechercher des nodes par le contenu.
Mais temps de calcul plus long.
This commit is contained in:
pablo rodriguez 2023-02-02 11:45:36 +01:00
parent 2ab3ed5a6f
commit 7ea995a909
8 changed files with 44 additions and 136 deletions

View File

@ -12,6 +12,6 @@
<classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/>
<classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/Exportation documentation analyseWriter/plugins/documentation.analyseWriter_1.0.0.202212032022.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar" sourcepath="/cXML"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

Binary file not shown.

112
bin/.gitignore vendored
View File

@ -1,112 +1,4 @@
/MEPTL/
/calcul/
/evaluer/
/fenetres/
/list/
/rechercheancragepagemini.png
/recherchecontenu.png
/recherchecontenu.svg
/recherchecontenumini.png
/recherchecontenuplusprochevoisin.png
/recherchecontenuplusprochevoisin.svg
/recherchecontenuplusprochevoisinmini.png
/rechercheindex.png
/rechercheindex.svg
/rechercheindexmini.png
/recherchemini.png
/redo.png
/saut.svg
/sautmini.png
/sautmultiple.png
/sautmultiple.svg
/sautmultiplemini.png
/sautpageColonne.svg
/sautpagecolonne.png
/sautpagecolonnemini.png
/save.png
/save.svg
/save_as.png
/saveas.svg
/saveasmini.png
/savemini.png
/savepreference.png
/savepreference.svg
/savepreferencemini.png
/section.png
/section.svg
/sequence.png
/sequence.svg
/setting.png
/setting.svg
/settingmini.png
/similitude.png
/similitude.svg
/similitudemini.png
/structurepage.png
/structurepage.svg
/stylepage.png
/stylepage.svg
/styleparagraphe.png
/styleparagraphe.svg
/supprime.svg
/supprimemini.png
/textclean.png
/textclean.svg
/textcleanmini.png
/titre.svg
/titremini.png
/totalpoint.png
/totalpoint.svg
/totalpointmini.png
/totalpointnode.png
/totalpointnode.svg
/totalpointnodemini.png
/touslesnodes.png
/touslesnodes.svg
/touslesnodesmini.png
/toutext.png
/toutext.svg
/toutextmini.png
/traduction.png
/traduction.svg
/traductionmini.png
/treeClose.png
/treeClose.svg
/treeLeaf.png
/treeLeaf.svg
/treeOpen.png
/treeOpen.svg
/triche.png
/triche.svg
/trichemini.png
/true.png
/true.svg
/truemini.png
/tutoriel.png
/tutoriel.svg
/tutorielmini.png
/undo.png
/upnode.png
/upnode.svg
/upnodemini.png
/verifhistorique.png
/verifhistoriquemax.png
/verifhistoriquemini.png
/verifhistoriquestudent.png
/verifhistoriquestudent.svg
/verifhistoriquestudentmini.png
/versevaluate.png
/versevaluate.svg
/versevaluatemini.png
/versfichierAnalyse.png
/versfichierAnalyseModifmax.svg
/voir.svg
/voirmini.png
/what.svg
/whatmini.png
/zip.png
/zip.svg
/zipmini.png
/zipstudent.png
/zipstudent.svg
/zipstudentmini.png
/MEPTL/
/evaluer/

View File

@ -234,7 +234,7 @@ public class rechercherUnNodeStudent {
*/
private static node findNodeByContenuTextuel(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a) {
node nodStudent = null;
// if(nodSujet.retourneLesContenusEnfants("").length()<1) return null;
String valueAttribut = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants(""));
Pattern p = Pattern.compile("^text:p$|^text:h$|^text:span$|^text:list|^text:line-break$|^text:note$|^text:tab$"); //le node qui peuvent rechercher par le contenu textuel
@ -247,38 +247,51 @@ public class rechercherUnNodeStudent {
if(nod2Student!=null) if(nodStudent==null) {
ArrayList<node> tousLesfreres = nod2Student.retourneTousLesFreres(); //Retourne tous les frère d'une même page
for(int i = 0 ; i < tousLesfreres.size();i++) {
if(nodStudent==null) if(!tousLesfreres.get(i).equals(nod2Student)) nodStudent = a.retourneFirstNameNodeByFindContentExactly(tousLesfreres.get(i).getNodes(), valueAttribut, nameNode);
if(nodStudent==null) {
nodStudent = a.retourneFirstNameNodeByFindContentExactly(tousLesfreres.get(i).getNodes(), valueAttribut, nameNode);
}
}
}
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod1Student.getNodes(), valueAttribut, nameNode);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod0Student.getNodes(), valueAttribut, nameNode);
// if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod1Student.getNodes(), valueAttribut, nameNode);
// if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod0Student.getNodes(), valueAttribut, nameNode);
if(nodStudent!=null) return nodStudent;
//méthode sans tenir compte de la casse et en supprimant tous les espaces
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod2Student.getNodes(), valueAttribut, nameNode);
if(nod2Student!=null) if(nodStudent==null) {
ArrayList<node> tousLesfreres = nod2Student.retourneTousLesFreres();
for(int i = 0 ; i < tousLesfreres.size();i++) {
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(tousLesfreres.get(i).getNodes(), valueAttribut, nameNode);
}
}
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod1Student.getNodes(), valueAttribut, nameNode);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod0Student.getNodes(), valueAttribut, nameNode);
// if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod2Student.getNodes(), valueAttribut, nameNode);
// if(nod2Student!=null) if(nodStudent==null) {
// ArrayList<node> tousLesfreres = nod2Student.retourneTousLesFreres();
// tousLesfreres.remove(nod2Student);
// for(int i = 0 ; i < tousLesfreres.size();i++) {
// if(nod2Student!=null) {
// if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(tousLesfreres.get(i).getNodes(), valueAttribut, nameNode);
// }
// }
// }
// if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod1Student.getNodes(), valueAttribut, nameNode);
// if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod0Student.getNodes(), valueAttribut, nameNode);
if(nodStudent!=null) return nodStudent;
// if(nodStudent!=null) return nodStudent;
//méthode par le calcul de la distance de levenshtein
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nameNode,0.1,null);
Run.setStockLaDerniereValeurSim(commandes.tolerance_text);
// if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nameNode,null);
if(nod2Student!=null) if(nodStudent==null) {
ArrayList<node> tousLesfreres = nod2Student.retourneTousLesFreres();
node stockNodeTrouveMeilleurVoisin = null;
for(int i = 0 ; i < tousLesfreres.size();i++) {
if(tousLesfreres.get(i)!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(tousLesfreres.get(i).getNodes(), nameNode,valueAttribut,0.75,null);
if(tousLesfreres.get(i)!=null) {
nodStudent = a.retourneLeNodeByContentPlusProche(tousLesfreres.get(i).getNodes(), valueAttribut, nameNode,null);
if(nodStudent!=null) {
stockNodeTrouveMeilleurVoisin = nodStudent;
}
}
}
if(stockNodeTrouveMeilleurVoisin!=null) nodStudent=stockNodeTrouveMeilleurVoisin;
}
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nameNode,0.1,null);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nameNode,0.1,null);
// if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nameNode,0.1,null);
// if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nameNode,0.1,null);
}else {
@ -306,10 +319,11 @@ public class rechercherUnNodeStudent {
private static node findNodeParContenuPlusProcheVoisinSim(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a , double sim) {
node nodStudent = null;
if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) {
Run.setStockLaDerniereValeurSim(commandes.tolerance_text);
String valueAttribut = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants(""));
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),sim,null);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),sim,null);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),sim,null);
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),null);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),null);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),null);
}
return nodStudent;
}
@ -328,11 +342,12 @@ public class rechercherUnNodeStudent {
private static node findNodeParContenuPlusProcheVoisin(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a ) {
node nodStudent = null;
if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")) {
cXML.Run.setStockLaDerniereValeurSim(0.5);
if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) {
String valueAttribut = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants(""));
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),null);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),null);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),null);
}
}
return nodStudent;

View File

@ -223,7 +223,7 @@ public class evaluationAttribut {
/**
* POINTS ENTREES DES METHODES D'EVALUATION</br>
* POINTS D'ENTREES DES METHODES D'EVALUATION</br>
* </br>
* Analyse tous les attributs et les contenus d'un node.<br>
* Les attributs et les contenus doivent posséder la caractère ou .<br>

View File

@ -15,6 +15,7 @@ public class listeDesNodesInfos {
case "text:list-item": return true;
case "page": return true;
case "text:span": return true;
case "text:index-title": return true;
default:
return false;