public class WordDFIDF extends Object implements ReadWriteable, Comparable<WordDFIDF>
| Modifier and Type | Field and Description |
|---|---|
long |
tf
Number of tweets in this timeperiod
|
long |
timeperiod
the measurment time period
|
long |
Ttf
Total number of tweets in all timeperiods
|
long |
Twf
Number of tweets containing this word in all timeperiods
|
long |
wf
Number of tweets containing this word in this time period
|
| Constructor and Description |
|---|
WordDFIDF()
Helpful for reading
|
WordDFIDF(long timeperiod,
long wf,
long tf,
long twf,
long ttf) |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
int |
compareTo(WordDFIDF other) |
double |
dfidf()
DF-IDF as defined by "Event Detection in Twitter by J.
|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
String |
toString() |
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public long Ttf
public long Twf
public long tf
public long wf
public long timeperiod
public WordDFIDF()
public WordDFIDF(long timeperiod, long wf, long tf, long twf, long ttf)
timeperiod - the timeperiodwf - Word count in this timeperiodtf - Tweet count in this timeperiodtwf - Word count across all timettf - Tweet count across all timepublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic double dfidf()
public int compareTo(WordDFIDF other)
compareTo in interface Comparable<WordDFIDF>public void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIin - source to read from.IOException - an error reading inputpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to out