public class FindTEITextLanguage
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FindTEITextLanguage.DocData
Hold language recognition results for one document.
|
Modifier and Type | Field and Description |
---|---|
protected static int |
currentFileNumber
Current document.
|
protected static int |
filesToProcess
Number of documents to process.
|
protected static int |
INITPARAMS
# params before input file specs.
|
protected static int |
longestTitle
Longest document title.
|
protected static java.util.Set<FindTEITextLanguage.DocData> |
outputSet
Holds sorted work titles and languages output.
|
protected static javax.xml.parsers.SAXParserFactory |
parserFactory
SAX parser factory.
|
protected static LanguageRecognizer |
recognizer
Language recognizer.
|
Constructor and Description |
---|
FindTEITextLanguage() |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
initialize(java.lang.String[] args)
Initialize.
|
static void |
main(java.lang.String[] args)
Main program.
|
protected static void |
outputResults(java.lang.String outputFileName)
Output results to tabular file.
|
protected static void |
printResults()
Print results.
|
protected static int |
processFiles(java.lang.String[] args)
Process files.
|
protected static void |
processOneFile(java.lang.String xmlFileName)
Process one file.
|
protected static void |
terminate(int filesProcessed,
long processingTime)
Terminate.
|
protected static LanguageRecognizer recognizer
protected static final int INITPARAMS
protected static java.util.Set<FindTEITextLanguage.DocData> outputSet
protected static javax.xml.parsers.SAXParserFactory parserFactory
protected static int filesToProcess
protected static int currentFileNumber
protected static int longestTitle
public static void main(java.lang.String[] args)
args
- Program parameters.protected static boolean initialize(java.lang.String[] args)
protected static void processOneFile(java.lang.String xmlFileName)
xmlFileName
- Input file name to check for language.protected static int processFiles(java.lang.String[] args)
protected static void printResults() throws java.lang.Exception
java.lang.Exception
protected static void outputResults(java.lang.String outputFileName) throws java.lang.Exception
outputFileName
- Output file name.java.lang.Exception
protected static void terminate(int filesProcessed, long processingTime)
filesProcessed
- Number of files processed.processingTime
- Processing time in seconds.