nikek
This commit is contained in:
parent
045e613ff2
commit
207b5ef807
|
|
@ -41,7 +41,7 @@ public class Avis {
|
|||
|
||||
|
||||
sommenote += a1;
|
||||
System.out.println(a+"taille");
|
||||
System.out.println(a.size()+"taille");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,18 @@ public class ListeAvis {
|
|||
}
|
||||
|
||||
try {
|
||||
int numeroFilm = Integer.parseInt(valeurs[1].trim());
|
||||
String url = valeurs[1].trim();
|
||||
|
||||
|
||||
|
||||
String url = valeurs[1].trim();
|
||||
|
||||
String[] parts = url.split("fichefilm"); // On coupe à "cfilm="
|
||||
String numberPart = parts[1].split("c")[0]; // On prend ce qui suit jusqu'au prochain "/"
|
||||
int numeroFilm = Integer.parseInt(numberPart);
|
||||
|
||||
String commentaire = valeurs[3].trim();
|
||||
int polarite = Integer.parseInt(valeurs[2].trim());
|
||||
System.out.println("hahahhahahhah");
|
||||
|
||||
listeAvis.add(new Avis(numeroFilm, url, commentaire, polarite));
|
||||
} catch (NumberFormatException e) {
|
||||
|
|
|
|||
|
|
@ -3,18 +3,17 @@ package Main;
|
|||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
// String cheminFichierExcel = "C:\\Users\\Qpelu\\Downloads\\big.csv";
|
||||
// String cheminSauvegarde = "C:\\Users\\Qpelu\\Downloads\\dictionnaire.csv";
|
||||
String cheminFichierExcel = "C:\\Users\\Qpelu\\Downloads\\big.csv";
|
||||
String cheminSauvegarde = "C:\\Users\\Qpelu\\Downloads\\dictionnaire.csv";
|
||||
|
||||
// ListeAvis listeAvis = new ListeAvis(cheminFichierExcel);
|
||||
ListeAvis listeAvis = new ListeAvis(cheminFichierExcel);
|
||||
|
||||
listeAvis.afficherAvis();
|
||||
// Dictionnaire dictionnaire = new Dictionnaire("C:\\Users\\Qpelu\\Downloads\\dictionnaire.csv");
|
||||
|
||||
// Avis a = new Avis(0, "szzn", "salut j'ai adoré ce film magnifique", 0);
|
||||
|
||||
Dictionnaire dictionnaire = new Dictionnaire("C:\\Users\\Qpelu\\Downloads\\dictionnaire.csv");
|
||||
|
||||
Avis a = new Avis(0, "szzn", "salut j'ai adoré ce film magnifique", 0);
|
||||
|
||||
|
||||
|
||||
|
||||
/* Avis.Analyse(a, dictionnaire);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue