Class pmr.cml.IndexTable
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.cml.IndexTable
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----pmr.cml.IndexTable
- public class IndexTable
- extends Hashtable
This holds an Index Table as a table of terms.
- Author:
- (C) P. Murray-Rust, 1996
-
IndexTable()
-
-
IndexTable(String)
- construct an IndexTable from a file (format is
term/filename
term/filename
...
-
IndexTable(String[])
- make an IndexTable from a list of filenames which contain
TERMENTRYs
-
cml2html(String)
- reads an Index Table in CML format and outputs the corresponding
HTML
-
getKeywords(String, int)
- breaks a string down into 'words' , rather crudely
-
main(String[])
-
-
markupHTML(StringList)
- reads an HTML file as a StringList and outputs a marked up version
-
markupHTMLFile(String, String)
-
-
outputTermAnalysis(String, String, String)
- outputs an analysis of the IndexTable
-
setMarkupGif(String)
- the filename of the GIF to be used for markup
-
setMarkupSpacing(int)
- set markup spacing - i.e.
-
stemOf(String)
- truncate a word to get the stem - assumes upper case; finds first
inflection which ends the word.
-
stemString()
- the symbol used to represent a word stem (e.g.
-
update(String, Object)
- updates an IndexTable (term, objects) where objects is either:
- a referred Object (e.g.
-
update(StringSet, Object)
- updates a Hashtable (term, objects) where objects is a Hashtable
of the objects that 'term' is involved with.
-
usage()
-
IndexTable
public IndexTable()
IndexTable
public IndexTable(String indexFile) throws IOException
- construct an IndexTable from a file (format is
term/filename
term/filename
...
IndexTable
public IndexTable(String filenames[])
- make an IndexTable from a list of filenames which contain
TERMENTRYs
stemString
public static String stemString()
- the symbol used to represent a word stem (e.g. *)
stemOf
public static String stemOf(String s)
- truncate a word to get the stem - assumes upper case; finds first
inflection which ends the word. if not possible, returns ""
update
public void update(String term,
Object referredObject)
- updates an IndexTable (term, objects) where objects is either:
- a referred Object (e.g. a TERMENTRY, a file, etc)
- OR a hashtable of the objects that 'term' is involved with.
Each term then references one or more objects. It's up to the user to
find out whether the keyedValue is a term or a Hashtable of terms
So far all the members are static - so I haven't got it fully right
- Parameters:
- term - the term
- referredObject - is an Object that the term points to
update
public void update(StringSet terms,
Object referredObject)
- updates a Hashtable (term, objects) where objects is a Hashtable
of the objects that 'term' is involved with. Each term then references
a set (Hashtable) of objects
- Parameters:
- this - the Hashtable of the terms
- terms - a StringSet of the terms to be added
- referredObject - is an Object that the terms point to
outputTermAnalysis
public void outputTermAnalysis(String filename,
String format,
String title) throws IOException
- outputs an analysis of the IndexTable
- Parameters:
- format - "" for unstructed text, or "CML"
getKeywords
public static StringSet getKeywords(String text,
int minlength)
- breaks a string down into 'words' , rather crudely
markupHTML
public StringList markupHTML(StringList raw)
- reads an HTML file as a StringList and outputs a marked up version
- Parameters:
- raw - the input as a StringList
- markuptable - the index as prepared by updateMarkup
setMarkupGif
public void setMarkupGif(String g)
- the filename of the GIF to be used for markup
setMarkupSpacing
public void setMarkupSpacing(int spacing)
- set markup spacing - i.e. the number of tokens before we repeat a link.
to the same term. Default is 1000;
markupHTMLFile
public void markupHTMLFile(String infileHTML,
String outfileHTML) throws IOException
cml2html
public static void cml2html(String cmlIndexFile)
- reads an Index Table in CML format and outputs the corresponding
HTML
usage
public static void usage()
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index