|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcodesimian.Email
public class Email
part of a college class project. mostly useless
| Field Summary | |
|---|---|
java.lang.String |
body
Exactly as given to the constructor. |
int |
bodyStarts
index in textIndex[] the email body starts. |
protected NaturalLanguage |
nl
|
double |
spamFraction
Range 0.0 (not at all like spam) to 1.0 (worst spam ever). |
java.lang.String |
subject
Exactly as given to the constructor. |
int[] |
textIndex
Each unique word has a number |
int |
uniqueWords
how many unique words could be in the values of textIndex[], even if some of those values are not in textIndex[]. |
double |
weight
Relatively how important this email is to figuring out what divides spam and nonspam. |
| Constructor Summary | |
|---|---|
Email(java.lang.String subject,
java.lang.String body,
double spamFraction,
NaturalLanguage nl)
|
|
| Method Summary | |
|---|---|
static Email[] |
getEmailsFromFile(java.lang.String fileName,
NaturalLanguage useThisInEmailConstructors)
The file must contain my own email input format: $$$startNewEmail $$$spam .87 $$$subject email subject here $$$text non-subject text here Put newlines wherever you want. |
void |
readAgain(NaturalLanguage nl)
|
java.lang.String |
textIndexsToString()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double spamFraction
public java.lang.String subject
public java.lang.String body
public int[] textIndex
public int uniqueWords
protected NaturalLanguage nl
public int bodyStarts
public double weight
| Constructor Detail |
|---|
public Email(java.lang.String subject,
java.lang.String body,
double spamFraction,
NaturalLanguage nl)
| Method Detail |
|---|
public void readAgain(NaturalLanguage nl)
public java.lang.String textIndexsToString()
public java.lang.String toString()
toString in class java.lang.Object
public static Email[] getEmailsFromFile(java.lang.String fileName,
NaturalLanguage useThisInEmailConstructors)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||