|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMotCle
La classe MotCle réunit un mot clé d'une Reponse
et un poids
de pertinence du mot clé.
Field Summary | |
private String |
mot
Le mot clé en question. |
private int |
poids
Le poids du mot clé dans la réponse. |
Constructor Summary | |
MotCle(String m,
int p)
Construit un MotCle à partir d'une String et d'un poids. |
Method Summary | |
private static int |
nombreDifferences(String a,
String b)
Retourne le nombre de caractères différents entre deux mots. |
double |
pertinence(String m)
Calcule la pertinence d'un mot de la réponse de l'utilisateur face au mot clé. |
int |
poids()
Retourne le poids du mot clé. |
String |
toString()
Retourne le mot clé. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private String mot
private int poids
Constructor Detail |
public MotCle(String m, int p)
m
- La chaîne de caractères représentant le mot clef.p
- Le poids du mot clé dans la réponse.p > 0
Method Detail |
private static int nombreDifferences(String a, String b)
a
- Un mot.b
- Un mot.public double pertinence(String m)
m
- Un mot de la réponse de l'utilisateur.m
est libre de tout symbole d'espace
ou de ponctuation.public int poids()
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |