textmaven.application.analyzer
Class Main

java.lang.Object
  extended bytextmaven.application.analyzer.Main
All Implemented Interfaces:
Globals

public class Main
extends java.lang.Object
implements Globals

Reads an ASCII file and either analyzes word occurrences, produces word lists for further processing and/or annotates the text read with hyperlinks into a vocabulary file produced by Translator.

Author:
krebtho

Field Summary
 
Fields inherited from interface textmaven.Globals
C_ATTR_CLASSNAME, C_DICT_BASE_TYPE, C_DICT_TYPE, C_SERVER_BASE_TYPE, C_STEMMER_BASE_TYPE, C_WRITER_BASE_TYPE, CONFIG_FILE, DEFAULT_SEPARATOR, NEW_PARA, T_COL_DICTIONARY, T_COL_HOMONYMID, T_COL_ID, T_COL_LEXKEY, T_COL_TRANSLATION, T_COL_WORDCLASS, VERBOSE
 
Constructor Summary
Main()
          Standard Constructor
 
Method Summary
protected  WordExtractor getExtractor()
          Gets WordExtractor instance.
protected  java.lang.String getFileName(java.io.File f)
          Returns name of file without any path.
protected  java.io.InputStream getInputFile()
          Returns stream used to read text.
protected  ITextReader getReader()
          Gets ITextReader instance.
protected  java.lang.String getSeparator()
          Gets separator which is used in output file to separate columns
protected  java.lang.String getVocabName(java.lang.String fileName)
          Returns name of the vocabulary file name.
 void init(java.lang.String[] args)
          Initializes instance from command line.
static void main(java.lang.String[] args)
          Main program.
 void process()
          Starts processing.
protected  void setInputFile(java.io.InputStream in)
          Sets stream to be used for reading text
protected  void setSeparator(java.lang.String separator)
          Sets separator which is used in output file to separate columns
 void usage(java.lang.String err)
          Prints usage string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Standard Constructor

Method Detail

init

public final void init(java.lang.String[] args)
Initializes instance from command line.

Parameters:
args - command line arguments

process

public void process()
Starts processing.


usage

public void usage(java.lang.String err)
Prints usage string.

Parameters:
err - If not null message is written before usage string.

getVocabName

protected java.lang.String getVocabName(java.lang.String fileName)
Returns name of the vocabulary file name. This filename is used as link destination in the HTML annotation process

Parameters:
fileName - HTML file name generated by this instance

getFileName

protected java.lang.String getFileName(java.io.File f)
                                throws java.io.IOException
Returns name of file without any path. I thought the File class would offer such service, but methods which sounded like providing it, turned out to return something different

Parameters:
f -
Returns:
filename without path.
Throws:
java.io.IOException

getExtractor

protected WordExtractor getExtractor()
Gets WordExtractor instance.

Returns:
Returns the extractor.

getReader

protected ITextReader getReader()
Gets ITextReader instance.

Returns:
Returns the reader.

getSeparator

protected java.lang.String getSeparator()
Gets separator which is used in output file to separate columns

Returns:
Returns the separator.

setSeparator

protected final void setSeparator(java.lang.String separator)
Sets separator which is used in output file to separate columns

Parameters:
separator -

setInputFile

protected final void setInputFile(java.io.InputStream in)
Sets stream to be used for reading text

Parameters:
in - input stream

getInputFile

protected final java.io.InputStream getInputFile()
Returns stream used to read text.

Returns:
input stream

main

public static void main(java.lang.String[] args)
Main program.

Parameters:
args -


Copyright © 2002-2005 Sourceforge. All Rights Reserved.