|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttp.model.DocRepresentTable
public class DocRepresentTable
Represents a table of one document representation.
Constructor Summary | |
---|---|
DocRepresentTable()
Constructor of the class. |
Method Summary | |
---|---|
void |
addFeature(java.lang.String feature)
Method inserts directly features to a binary representation |
void |
addFeature(java.lang.String feature,
java.lang.Integer frequency)
Method inserts directly features and their frequencies |
java.util.ArrayList<FeatureInterface> |
getArrayFeaturesFrequency()
Method returs the whole representation of a document with all features. |
int |
getFeatureBinary(java.lang.String f)
Method returns occurence of a feature (for binary model) |
double |
getFeatureTF(java.lang.String f)
Method returns a term frequency a feature, wich is given as a parameter |
double |
getFeatureTFidf(java.lang.String f)
Method returns a TFIDF weight a feature, which is given as a parameter |
java.lang.String |
getTopic()
Returns a class of represented document. |
void |
includeFeature(java.lang.String f,
DocsRepresentDB.RepresentationModel model)
Method adds a new feature to the representation, if it does not exist. |
void |
setTopic(java.lang.String topic)
Sets a class of represented document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocRepresentTable()
Method Detail |
---|
public void includeFeature(java.lang.String f, DocsRepresentDB.RepresentationModel model)
f
- a featuremodel
- model of representation (binary/tf/tf-idf)public void addFeature(java.lang.String feature, java.lang.Integer frequency)
feature
- a feature (word)frequency
- frequency of a featurepublic void addFeature(java.lang.String feature)
feature
- a new featurepublic double getFeatureTF(java.lang.String f)
feature
- a given feature
public double getFeatureTFidf(java.lang.String f)
feature
- a given feature
public int getFeatureBinary(java.lang.String f)
feature
- a given feature
public java.util.ArrayList<FeatureInterface> getArrayFeaturesFrequency()
public java.lang.String getTopic()
public void setTopic(java.lang.String topic)
a
- class in a form of string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |