|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdatapreparation.collocation.Collection
public class Collection
Class implementing a term collection. A term collection consists of a list of terms with total frequence (sum of frequence in all texts) and the number of text the term is present in. Each term also has a list of which texts it is present in.
Constructor Summary | |
---|---|
Collection()
Constructor creating a new hashtable for storing terms. |
Method Summary | |
---|---|
void |
fillCollection(DataSet set)
Method for filling the collection. |
java.util.ArrayList |
getDocuments(java.lang.String term)
Method for getting which documents a term appears in. |
int |
getFrequency(java.lang.String term)
Method for getting the total frequency of a given term. |
int |
getNofTexts(java.lang.String term)
Method for getting the number of texts the given term is present in. |
int |
getTotalNumberOfTokens()
Method for getting the total number of tokens in the dataset. |
int |
possibleCollocations(java.lang.String text)
Method for calculating the number of possible collocations in a text |
java.lang.String |
removeChars(java.lang.String word)
Method for removing specific characters from a word. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Collection()
Method Detail |
---|
public void fillCollection(DataSet set)
set
- The datasetpublic int getTotalNumberOfTokens()
public java.lang.String removeChars(java.lang.String word)
word
- The word
public int getFrequency(java.lang.String term)
term
- The term
public int getNofTexts(java.lang.String term)
term
- The term
public java.util.ArrayList getDocuments(java.lang.String term)
term
- The term
public int possibleCollocations(java.lang.String text)
text
- The text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |