edu.upenn.cis.taggers.gene
Class GeneTagger

java.lang.Object
  extended by edu.upenn.cis.taggers.gene.GeneTagger
All Implemented Interfaces:
Tagger

public class GeneTagger
extends java.lang.Object
implements Tagger

Tags genes within a body of text


Constructor Summary
GeneTagger(java.lang.String model)
          Construct a new gene tagger -- read in the model and whatnot
 
Method Summary
 TagList getTagList()
           
 java.lang.String[] htmlCloseTags()
          See Tagger for details
 java.lang.String htmlHeader()
          Returns the header that should be written to an HTML output file.
 java.lang.String[] htmlOpenTags()
          See Tagger for details
 java.lang.String[] medlineTags()
          See Tagger for details
 java.lang.String tag(java.lang.String in)
          Returns XML-tagged data
 java.lang.String[] xmlTags()
          See Tagger for details
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneTagger

public GeneTagger(java.lang.String model)
           throws LoadModelException
Construct a new gene tagger -- read in the model and whatnot

Parameters:
in - The CRF4 model to use
Throws:
LoadModelException
Method Detail

tag

public java.lang.String tag(java.lang.String in)
                     throws java.io.IOException
Returns XML-tagged data

Specified by:
tag in interface Tagger
Parameters:
in - The String to tag
Returns:
The tagged String
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()
See Tagger for details

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

medlineTags

public java.lang.String[] medlineTags()
See Tagger for details

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

htmlOpenTags

public java.lang.String[] htmlOpenTags()
See Tagger for details

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

htmlCloseTags

public java.lang.String[] htmlCloseTags()
See Tagger for details

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