edu.upenn.cis.taggers.variation
Class VariationTagger

java.lang.Object
  extended by edu.upenn.cis.taggers.variation.VariationTagger
All Implemented Interfaces:
Tagger

public class VariationTagger
extends java.lang.Object
implements Tagger

Tags variations (mutations and such) within a body of text


Constructor Summary
VariationTagger(java.lang.String model)
          Construct a variationTagger
 
Method Summary
 TagList getTagList()
           
 java.lang.String[] htmlCloseTags()
          Returns a string array of the HTML tags that should follow each tagged entity.
 java.lang.String htmlHeader()
          Returns the header that should be written to an HTML output file.
 java.lang.String[] htmlOpenTags()
          Returns a string array of the HTML tags that should precede each tagged entity.
 java.lang.String[] medlineTags()
          Returns a string array of the MEDLINE tags that should be written to the MEDLINE file.
 java.lang.String tag(java.lang.String line)
          Returns the input String with xml tagging inline.
 java.lang.String[] xmlTags()
          Returns a string array of the xml tags this tagger may insert.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariationTagger

public VariationTagger(java.lang.String model)
                throws LoadModelException
Construct a variationTagger

Parameters:
model - Filename of the model to use
Throws:
LoadModelException
Method Detail

tag

public java.lang.String tag(java.lang.String line)
                     throws java.io.IOException
Description copied from interface: Tagger
Returns the input String with xml tagging inline. The model file used for this should have already been loaded in the Tagger's constructor.

Specified by:
tag in interface Tagger
Parameters:
line - The String to be tagged and returned
Returns:
The String tagged with XML data inline
Throws:
java.io.IOException

getTagList

public TagList getTagList()

htmlHeader

public java.lang.String htmlHeader()
Description copied from interface: Tagger
Returns the header that should be written to an HTML output file. This should include, at bare minimum, HTML and BODY tags, but may have other information as well, such as a legend for the document.

Specified by:
htmlHeader in interface Tagger
Returns:
The HTML header

xmlTags

public java.lang.String[] xmlTags()
Description copied from interface: Tagger
Returns a string array of the xml tags this tagger may insert. Should be the complete opening tag, with brackets.

Specified by:
xmlTags in interface Tagger
Returns:
An array of XML tags, complete with brackets

medlineTags

public java.lang.String[] medlineTags()
Description copied from interface: Tagger
Returns a string array of the MEDLINE tags that should be written to the MEDLINE file. Should correspond to the XML tags -- that is, the data tagged by xmlTags()[i] will be written out to MEDLINE tag medlineTags()[i]. Should be no longer than 4 characters, but may be shorter.

Specified by:
medlineTags in interface Tagger
Returns:
An array of MEDLINE tags

htmlOpenTags

public java.lang.String[] htmlOpenTags()
Description copied from interface: Tagger
Returns a string array of the HTML tags that should precede each tagged entity. These should correspond in order to the xmlTags array.

Specified by:
htmlOpenTags in interface Tagger
Returns:
An array of HTML tags to be written before tagged data

htmlCloseTags

public java.lang.String[] htmlCloseTags()
Description copied from interface: Tagger
Returns a string array of the HTML tags that should follow each tagged entity. These should correspond in order to the xmlTags array.

Specified by:
htmlCloseTags in interface Tagger
Returns:
An array of HTML tags to be written after tagged data