tp.model
Class FeatureBinary

java.lang.Object
  extended by tp.model.FeatureBinary
All Implemented Interfaces:
FeatureInterface

public class FeatureBinary
extends java.lang.Object
implements FeatureInterface

Class representing a feature and its frequency in binary model.


Field Summary
static int PRESENCE
           
 
Constructor Summary
FeatureBinary(java.lang.String feature)
          Constructor of the class
 
Method Summary
 java.lang.String getFeature()
          Gets a word, which is represented by this feature.
 int getRate()
          Gets a binary frequency of this feature.
 void setFeature(java.lang.String feature)
          Sets a word, which is represented by this feature.
 void setRate(int rate)
          Sets a binary frequency of this feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRESENCE

public static final int PRESENCE
See Also:
Constant Field Values
Constructor Detail

FeatureBinary

public FeatureBinary(java.lang.String feature)
Constructor of the class

Parameters:
feature - a feature (word)
Method Detail

getFeature

public java.lang.String getFeature()
Gets a word, which is represented by this feature.

Specified by:
getFeature in interface FeatureInterface
Returns:
a feature (word)

setFeature

public void setFeature(java.lang.String feature)
Sets a word, which is represented by this feature.

Specified by:
setFeature in interface FeatureInterface
Parameters:
feature - a feature (word)

getRate

public int getRate()
Gets a binary frequency of this feature.

Specified by:
getRate in interface FeatureInterface
Returns:
value of frequency (0 or 1)

setRate

public void setRate(int rate)
Sets a binary frequency of this feature.

Specified by:
setRate in interface FeatureInterface
Parameters:
rate - value of frequency (0 or 1)