|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjxtract.BigramCollection
public class BigramCollection
BigramCollection is the datastructure that contains information about a word and all of the bigrams that are within a distance of 5 words from it in any sentence in the corpus.
Constructor Summary | |
---|---|
BigramCollection()
Contructor |
Method Summary | |
---|---|
boolean |
addSentence(java.lang.String w,
java.lang.String s,
boolean includeClosedClass)
Takes a sentence and adds all bigrams in the "phrase" (+/- 5 words) to the collection. |
double |
getFbar()
Returns fbar, the average frequency of all bigrams for this word. |
double |
getSigma()
Returns sigma, the standard deviation of the frequency of all bigrams for this word. |
java.util.Vector |
getStageOneBigrams(double k0,
double k1,
double U0)
Returns a Vector with the bigrams left after Stage 1 of the algorithm and their characteristics. |
java.lang.String |
getTable2()
Gets a string representing the contents of the BigramCollection similar to the format presented in Table 2 of the Smadja paper. |
java.lang.String |
getTable4()
Present the results of Step 1.3 in the Smadja algorithm. |
void |
stage2(double T)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BigramCollection()
w_
- The word for which bigrams will be collected.Method Detail |
---|
public boolean addSentence(java.lang.String w, java.lang.String s, boolean includeClosedClass) throws java.lang.Exception
s
- The sentence to be added.
true
if insert is successful, false
otherwise.
java.lang.Exception
- If given sentence does not contain the word this
BigramCollection tracks.public double getFbar()
public double getSigma()
public java.lang.String getTable2()
public java.lang.String getTable4()
public java.util.Vector getStageOneBigrams(double k0, double k1, double U0)
public void stage2(double T)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |