|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--mark.nlp.features.CorpusCounter
|
+--mark.nlp.features.BagCorpusCounter
A corpus counter implemented as a collection of bags. The big bag contains counts in the entire corpus. Each cbag contains the counts with a single category.
| Constructor Summary | |
BagCorpusCounter(Bag bigBag,
Bag[] cBags)
Initializes the BagCorpusCounter with the given bags. |
|
| Method Summary | |
Bag |
bigBag()
Returns the big bag. |
Bag |
cBag(int c)
Returns a c bag. |
int |
CLength()
Returns the number of values C can assume. |
double |
num()
Returns the total number of samples. |
double |
numC(int c)
Returns #(C = c). |
double |
numCW(int c,
java.lang.Object w)
Returns #(C = c, W = w). |
double |
numW(java.lang.Object w)
Returns #(W = w). |
java.util.Iterator |
WIterator()
Returns an iterator over the values W can assume. |
java.util.Iterator |
WIterator(int c)
Returns an iterator over the values W assumes in conjunction with a given value of C. |
int |
WLength()
Returns the number of values W can assume. |
| Methods inherited from class mark.nlp.features.CorpusCounter |
countTable, countTable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BagCorpusCounter(Bag bigBag,
Bag[] cBags)
bigBag - the entire bag of samples.cBags - an array of bags, one for each value of C.| Method Detail |
public Bag bigBag()
public Bag cBag(int c)
c - the index of the c bag.
public java.util.Iterator WIterator()
WIterator in class CorpusCounterpublic java.util.Iterator WIterator(int c)
WIterator in class CorpusCounterc - the C value.
public int CLength()
CLength in class CorpusCounterpublic int WLength()
WLength in class CorpusCounter
public double numCW(int c,
java.lang.Object w)
numCW in class CorpusCounterc - the C value.w - the W value.
public double numC(int c)
numC in class CorpusCounterc - the C value.
public double numW(java.lang.Object w)
numW in class CorpusCounterw - the W value.
public double num()
num in class CorpusCounter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||