modnlp.idx.database
public class FreqTable extends java.lang.Object
KEY | DATA ---------------|------------------- wordform | no_of_occurrences
Modifier and Type | Field and Description |
---|---|
protected com.sleepycat.je.Database |
database |
protected java.lang.String |
dbname |
protected com.sleepycat.je.Environment |
environment |
protected LogStream |
logf |
Constructor and Description |
---|
FreqTable(com.sleepycat.je.Environment env,
java.lang.String fn,
boolean write) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
dump() |
static boolean |
exists(com.sleepycat.je.Environment env,
java.lang.String fn) |
void |
finalize() |
void |
get(com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry data) |
com.sleepycat.je.Cursor |
getCursor() |
int |
getFrequency(java.lang.String sik) |
com.sleepycat.je.SecondaryCursor |
getSecondaryCursor() |
int |
getTotalNoOfTokens() |
int |
getTotalNoOfTypes()
Retrive total number of types, where each (case-sensitive) form
of a word counts as a type.
|
double |
getTypeTokenRatio()
Return the case-sensitive type token ratio.
|
void |
printSortedFreqList(java.io.PrintWriter os)
Describe
printSortedFreqList method here. |
void |
printSortedFreqList(java.io.PrintWriter os,
int max) |
void |
printSortedFreqList(java.io.PrintWriter os,
int from,
int max,
boolean nocase) |
void |
put(com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry val) |
int |
put(java.lang.String sik,
int noccur) |
void |
remove(com.sleepycat.je.DatabaseEntry key) |
int |
remove(java.lang.String sik,
int noccur) |
void |
setup(com.sleepycat.je.Environment env,
java.lang.String fn,
boolean write,
LogStream l) |
java.lang.String |
toString() |
protected com.sleepycat.je.Environment environment
protected com.sleepycat.je.Database database
protected java.lang.String dbname
protected LogStream logf
public FreqTable(com.sleepycat.je.Environment env, java.lang.String fn, boolean write) throws com.sleepycat.je.DatabaseNotFoundException
com.sleepycat.je.DatabaseNotFoundException
public int getFrequency(java.lang.String sik)
public int put(java.lang.String sik, int noccur)
public int remove(java.lang.String sik, int noccur)
public int getTotalNoOfTokens()
public int getTotalNoOfTypes()
modnlp.idx.database.CaseTable#getTotalNoOfTokens
for an
alternative that corresponds to the usual definition of number of
types.int
valuepublic double getTypeTokenRatio()
Dictionary.getTypeTokenRatio(boolean)
for a better
alternative.double
valueDictionary.getTypeTokenRatio(boolean)
public void dump()
public void printSortedFreqList(java.io.PrintWriter os)
printSortedFreqList
method here.os
- a PrintWriter
valuepublic void printSortedFreqList(java.io.PrintWriter os, int max)
public void printSortedFreqList(java.io.PrintWriter os, int from, int max, boolean nocase)
public com.sleepycat.je.Cursor getCursor() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
public com.sleepycat.je.SecondaryCursor getSecondaryCursor() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
public void close()
public void setup(com.sleepycat.je.Environment env, java.lang.String fn, boolean write, LogStream l) throws com.sleepycat.je.DatabaseNotFoundException
com.sleepycat.je.DatabaseNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean exists(com.sleepycat.je.Environment env, java.lang.String fn)
public void finalize()
finalize
in class java.lang.Object
public void put(com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry val)
public void remove(com.sleepycat.je.DatabaseEntry key)
public void get(com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry data)