|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.tagger.maxent.GlobalHolder
public class GlobalHolder
This class holds many global variables and other things that are used by the Stanford MaxEnt Part-of-speech Tagger package.
Method Summary | |
---|---|
static boolean |
add(FeatureKey s)
Adds a FeatureKey to the set of known FeatureKeys. |
static boolean |
convertMultifileTagger(String filename,
String newFilename,
TaggerConfig config)
This method is provided for backwards compatibility with the old tagger. |
static LambdaSolve |
getLambdaSolve()
|
static int |
getNum(FeatureKey s)
|
static int |
getNum(FeatureKey s,
HashMap<FeatureKey,Integer> fAssocs)
|
static void |
init()
|
static void |
init(TaggerConfig config)
|
static boolean |
isRare(String word)
|
static void |
putAssoc(FeatureKey s,
int num)
|
static boolean |
read(String filename)
|
static HashMap<FeatureKey,Integer> |
readAssociations(String modelFilename)
This reads the .assoc file. |
static TaggerConfig |
readConfig(InputStream file)
read in the TaggerConfig |
static void |
readExtractors(InputStream file)
read the extractors from a filename |
static void |
readExtractors(String filename)
read the extractors from a filename |
static void |
release_mem()
|
static void |
save_after(OutDataStreamFile file)
|
static void |
save_prev(String filename)
|
static void |
save_prev(TaggerConfig config,
OutDataStreamFile file)
|
static void |
saveConfig(TaggerConfig config,
OutputStream os)
serialize the TaggerConfig |
static void |
saveExtractors(OutputStream os)
serialize the ExtractorFrames and ExtractorFramesRare in filename |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LambdaSolve getLambdaSolve()
public static void init()
public static void init(TaggerConfig config)
public static boolean add(FeatureKey s)
s
- The feature key to be added
public static void putAssoc(FeatureKey s, int num)
public static int getNum(FeatureKey s)
public static int getNum(FeatureKey s, HashMap<FeatureKey,Integer> fAssocs)
public static void saveConfig(TaggerConfig config, OutputStream os) throws Exception
Exception
public static TaggerConfig readConfig(InputStream file) throws Exception
Exception
public static void saveExtractors(OutputStream os) throws Exception
Exception
public static void readExtractors(String filename) throws Exception
Exception
public static void readExtractors(InputStream file) throws Exception
Exception
public static void save_prev(String filename)
public static void save_prev(TaggerConfig config, OutDataStreamFile file)
public static HashMap<FeatureKey,Integer> readAssociations(String modelFilename)
modelFilename
- The string .assoc is appended and feature
associations are then read from this file
public static void release_mem()
public static void save_after(OutDataStreamFile file)
public static boolean convertMultifileTagger(String filename, String newFilename, TaggerConfig config) throws Exception
filename
- newFilename
-
Exception
public static boolean read(String filename) throws Exception
Exception
public static boolean isRare(String word)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |