modnlp.tc.dstruct
public abstract class TCProbabilityModel extends java.lang.Object implements java.io.Serializable
BVProbabilityModel, which implements
the model described in [Sebastiani, 02] and elsewhere), and models
where events are sets of token placeholders (as in [Mitchell, 97],
for instance). It is assumed that TCProbabilityModel
will be serialised and seved to disk for later use (e.g. by a
classifer), hence the extension of Serializable and
the fields and methods to store and retrieve creation
information. TCProbabilityModels will be used
typically in conjunction with TCInvertedIndex objects.TCInvertedIndex,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
TCInvertedIndex |
invertedIndex
All TC probability models must be based on an inverted index
|
static byte |
LAPLACE |
static byte |
NOSMOOTHING |
| Constructor and Description |
|---|
TCProbabilityModel() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCreationInfo()
Get the value of creationInfo.
|
java.lang.String |
getCreator()
Get the value of creationInfo.
|
java.lang.String[] |
getCreatorArgs()
Get the value of creatorArgs.
|
java.lang.String |
getCreatorArgsCSV()
Get the value of creatorArgs as list of comma-separated values.
|
abstract Probabilities |
getProbabilities(java.lang.String term,
java.lang.String category)
Get a summary of probabilities associated with
term and category |
byte |
getSmoothingType() |
void |
setCreator(java.lang.String v)
Set the value of creationInfo.
|
void |
setCreatorArgs(java.lang.String[] v)
Set the value of creatorArgs.
|
void |
setSmoothingType(byte s) |
public static final byte NOSMOOTHING
public static final byte LAPLACE
public TCInvertedIndex invertedIndex
public abstract Probabilities getProbabilities(java.lang.String term, java.lang.String category)
term and categoryterm - a String valuecategory - a String valueProbabilities valuepublic java.lang.String getCreator()
public void setCreator(java.lang.String v)
v - Value to assign to creationInfo.public java.lang.String[] getCreatorArgs()
public java.lang.String getCreatorArgsCSV()
public void setCreatorArgs(java.lang.String[] v)
v - Value to assign to creatorArgs.public java.lang.String getCreationInfo()
public byte getSmoothingType()
public void setSmoothingType(byte s)