public class StringStats extends Stats implements java.io.Serializable
Constructor and Description |
---|
StringStats(java.lang.String attributeName)
Constructs a new StringStats
|
Modifier and Type | Method and Description |
---|---|
static StringStats |
attributeToStats(weka.core.Attribute a)
Convert a meta summary attribute containing string stats into a StringStats
object
|
void |
computeDerived()
Compute derived statistics - e.g.
|
NumericStats |
getStringLengthStats()
Get the underlying NumericStats object that is tracking string length stats
|
NumericStats |
getWordCountStats()
Get the underlying NumericStats object that is tracking word count stats
|
weka.core.Attribute |
makeAttribute()
Makes a Attribute that encapsulates the meta data
|
void |
update(java.lang.String value,
double weight)
Update with a new value
|
public StringStats(java.lang.String attributeName)
attributeName
- the name of the attribute/field to collect stats forpublic NumericStats getStringLengthStats()
public NumericStats getWordCountStats()
public weka.core.Attribute makeAttribute()
Stats
makeAttribute
in class Stats
public void update(java.lang.String value, double weight)
value
- the string value to update withweight
- the weight for the updatepublic void computeDerived()
public static StringStats attributeToStats(weka.core.Attribute a)
a
- a meta summary attribute