|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJet.JetTest
contains the main method for Jet, and the methods for initial loading of linguistic data (grammars, lexicons, patterns, etc.).
Field Summary | |
static boolean |
batchFlag
true to run in 'batch' mode, with no console display window |
static ConceptHierarchy |
conceptHierarchy
|
static java.io.File |
conceptHierarchyFile
|
protected static java.util.Properties |
config
|
protected static java.lang.String |
dataPath
|
protected static java.util.Properties |
defaultConfig
|
static java.lang.String |
encoding
|
protected static Grammar |
gram
|
protected static HMMNameTagger |
nameTagger
|
static java.io.File |
patternFile
|
static PatternCollection |
pc
|
static HMMTagger |
tagger
|
protected static java.util.Vector |
views
|
Constructor Summary | |
JetTest()
|
Method Summary | |
static void |
closeAllViews()
|
static java.lang.String |
getConfig(java.lang.String property)
return property 'property' from the configuration file. |
static java.lang.String |
getConfigFile(java.lang.String property)
return file name 'property' from the configuration file; if the value is a relative path, prefix it with the value of 'Jet.dataPath' from the configuration file. |
static void |
initialize()
load all resources (lexicon, HMMs, patterns, grammar, concepts) as specified in the .properties file. |
static void |
initializeFromConfig(java.io.File configFile)
read Jet parameter file from file configFile and load all
specified resources. |
static void |
initializeFromConfig(java.lang.String configFile)
|
static void |
main(java.lang.String[] args)
|
static void |
processFile(java.lang.String inputFileName,
boolean viewable)
process all the documents on file inputFileName , displaying
the results in View windows if viewable is true. |
static void |
processFiles(boolean viewable)
for each Jet parameter beginning JetTest.fileName , invoke
processFile on that file of documents. |
static void |
readChunkModel()
if the parameter Chunker.fileName is set, load a
chunk model from that file. |
static void |
readConcepts()
if the parameter Concepts.fileName is set, load a
concept hierarchy from that file. |
static Document |
readDocument(java.io.BufferedReader rdr)
read a document from rdr . |
static void |
readGrammar()
if the parameter Grammar.fileName is set, load a
grammar from that file. |
static void |
readLexicons()
load all lexicons specified by parameters beginning with the string Englishlex.fileName |
static void |
readNameTags()
if the parameter NameTags.fileName is set, load a
name tagger HMM from that file. |
static void |
readPatterns()
load all pattern files specified by parameters beginning with the string Pattern.fileName |
static void |
readTags()
if the parameter Tags.fileName is set, load a
part-of-speech HMM from that file. |
static boolean |
setEncoding(java.lang.String charset)
set the character set used for reading external documents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean batchFlag
protected static java.util.Properties defaultConfig
protected static java.util.Properties config
protected static java.lang.String dataPath
public static PatternCollection pc
public static java.io.File patternFile
protected static Grammar gram
public static HMMTagger tagger
protected static HMMNameTagger nameTagger
protected static java.util.Vector views
public static ConceptHierarchy conceptHierarchy
public static java.io.File conceptHierarchyFile
public static java.lang.String encoding
Constructor Detail |
public JetTest()
Method Detail |
public static void initializeFromConfig(java.io.File configFile)
configFile
and load all
specified resources.
public static void initializeFromConfig(java.lang.String configFile)
public static java.lang.String getConfig(java.lang.String property)
public static java.lang.String getConfigFile(java.lang.String property)
public static void initialize()
public static void readLexicons()
Englishlex.fileName
public static void readTags()
Tags.fileName
is set, load a
part-of-speech HMM from that file.
public static void readNameTags()
NameTags.fileName
is set, load a
name tagger HMM from that file. If parameter
NameTags.emitter
is set, use the value of that parameter
as the name of the emitter class for the HMM, otherwise used
WordFeatureHMMemitter as the default.
public static void readPatterns()
Pattern.fileName
public static void readGrammar()
Grammar.fileName
is set, load a
grammar from that file.
public static void readChunkModel()
Chunker.fileName
is set, load a
chunk model from that file.
public static void readConcepts()
Concepts.fileName
is set, load a
concept hierarchy from that file.
public static void processFile(java.lang.String inputFileName, boolean viewable) throws java.io.IOException
inputFileName
, displaying
the results in View windows if viewable
is true. The file
should contain one or more documents, each beginning with a line <DOC> and
ending with a line </DOC> .
java.io.IOException
public static void processFiles(boolean viewable)
JetTest.fileName
, invoke
processFile
on that file of documents.
public static void closeAllViews()
public static Document readDocument(java.io.BufferedReader rdr) throws java.io.IOException
rdr
. The document begins with a line
<DOC> and ends with a line </DOC> .
java.io.IOException
public static boolean setEncoding(java.lang.String charset)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |