|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttp.model.DocsRepresentDB
public class DocsRepresentDB
Class representing all documents represented by the DocRepresentTable class.
Nested Class Summary | |
---|---|
class |
DocsRepresentDB.FeatureDF
Class to store frequencies of features in documents. |
static class |
DocsRepresentDB.Preprocessing
|
static class |
DocsRepresentDB.RepresentationFeature
|
static class |
DocsRepresentDB.RepresentationModel
|
Constructor Summary | |
---|---|
DocsRepresentDB(DocsRepresentDB.RepresentationModel model,
DocsRepresentDB.RepresentationFeature feature,
DocsRepresentDB.Preprocessing preprocessing)
Class construtor. |
Method Summary | |
---|---|
void |
addDocument(DocRepresentTable document)
Adds a new document representation. |
double |
getAvgCountFeatures()
Gets the average count of features in documents. |
double |
getAvgFrequentFeature()
Gets the average feature frequency in documents. |
double |
getAvgTFFeature()
Gets the average value of term frequency among all documents. |
double |
getAvgTFidfFeature()
Gets the average value of TF-IDF weight among all documents. |
int |
getCountDocuments()
Returs the count of document representations in database. |
int |
getCountFeatures()
Gets the count of all features in documents. |
DocRepresentTable |
getDocumentAt(int index)
Returns one document representation at the given position |
DocRepresentTable |
getDocumentSingly()
Method returns one document, which is next to the actual cursor. |
DocsRepresentDB.RepresentationFeature |
getFeature()
Returns a feature type. |
int |
getFeatureFreqInCorpus(java.lang.String feature)
Returns an IDF value of a feature for the whole dataset |
java.util.ArrayList<DocsRepresentDB.FeatureDF> |
getFeaturesDocumentFreq()
Returns an array of document frequencies for all features |
int |
getMaxCountFeatures()
Gets the maximum count of features in one document. |
int |
getMaxFrequentFeature()
Gets the maximum frequency of a feature among all documents. |
double |
getMaxTFFeature()
Gets the maximum value of term frequency among all documents. |
double |
getMaxTFidfFeature()
Gets the maximum value of TF-DF weight among all documents. |
int |
getMinNGramOccur()
Gets the minimum N-gram occurence in documents. |
DocsRepresentDB.RepresentationModel |
getModel()
Returns actual representation model. |
int |
getNGramDepth()
Gets the N-gram depth setting (number of words in one N-gram). |
DocsRepresentDB.Preprocessing |
getPreprocessing()
Returns actual pre-processing options. |
void |
setAvgCountFeatures(double avg_count_features)
Sets the average count of features in documents. |
void |
setAvgFrequentFeature(double avg_frequent_feature)
Sets the average feature frequency in documents. |
void |
setAvgTFFeature(double avg_tf_feature)
Sets the average value of term frequency among all documents. |
void |
setAvgTFidfFeature(double avg_tfidf_feature)
Sets the average value of TF-IDF weight among all documents. |
void |
setCountFeatures(int count_features)
Sets the count of all features in documents. |
void |
setMaxCountFeatures(int max_count_features)
Sets the maximum count of features in one document. |
void |
setMaxFrequentFeature(int max_frequent_feature)
Sets the maximum frequency of a feature among all documents. |
void |
setMaxTFFeature(double max_tf_feature)
Sets the maximum value of term frequency among all documents. |
void |
setMaxTFidfFeature(double max_tfidf_feature)
Sets the maximum value of TF-DF weight among all documents. |
void |
setMinNGramOccur(int min_ngram_occur)
Sets the minimum N-gram occurence in documents. |
void |
setNGramDepth(int ngram_depth)
Sets the N-gram depth setting (number of words in one N-gram). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocsRepresentDB(DocsRepresentDB.RepresentationModel model, DocsRepresentDB.RepresentationFeature feature, DocsRepresentDB.Preprocessing preprocessing)
model
- a model for document representationfeature
- tyoe of feature used in this representationpreprocessing
- pre-processing optionsMethod Detail |
---|
public void addDocument(DocRepresentTable document)
document
- document to be addedpublic DocRepresentTable getDocumentSingly()
public DocRepresentTable getDocumentAt(int index)
index
- a position of a required document
public int getCountDocuments()
public int getFeatureFreqInCorpus(java.lang.String feature)
feature
- a feature (word)
public java.util.ArrayList<DocsRepresentDB.FeatureDF> getFeaturesDocumentFreq()
public DocsRepresentDB.RepresentationFeature getFeature()
public DocsRepresentDB.RepresentationModel getModel()
public DocsRepresentDB.Preprocessing getPreprocessing()
public double getAvgCountFeatures()
public void setAvgCountFeatures(double avg_count_features)
avg_count_features
- average count of featurespublic double getAvgFrequentFeature()
public void setAvgFrequentFeature(double avg_frequent_feature)
avg_frequent_feature
- average feature frequency valuepublic int getCountFeatures()
public void setCountFeatures(int count_features)
count_features
- count of all featurespublic int getMaxCountFeatures()
public void setMaxCountFeatures(int max_count_features)
max_count_features
- maximum count of featurespublic int getMaxFrequentFeature()
public void setMaxFrequentFeature(int max_frequent_feature)
max_frequent_feature
- maximum feature frequencypublic double getAvgTFFeature()
public void setAvgTFFeature(double avg_tf_feature)
avg_tf_feature
- average value of TFpublic double getAvgTFidfFeature()
public void setAvgTFidfFeature(double avg_tfidf_feature)
avg_tfidf_feature
- average value of TF-IDFpublic double getMaxTFFeature()
public void setMaxTFFeature(double max_tf_feature)
max_tf_feature
- maximum value of TFpublic double getMaxTFidfFeature()
public void setMaxTFidfFeature(double max_tfidf_feature)
max_tfidf_feature
- maximum value of TF-IDFpublic int getMinNGramOccur()
public void setMinNGramOccur(int min_ngram_occur)
min_ngram_occur
- minimum N-gram occurencepublic int getNGramDepth()
public void setNGramDepth(int ngram_depth)
ngram_depth
- N-gram depth
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |