Class com.phrasys.tagger.Tagger

java.lang.Object
    |
    +----com.phrasys.tagger.Tagger

public class Tagger
extends java.lang.Object
implements WordListener, java.io.Serializable

Constructor Index

 o Tagger()
constructor

Method Index

 o addMarkup(WordEvent)
Add an annotation.
 o addWordListener(WordListener)
register listeners
 o getResourceFile()
 
 o removeWordListener(WordListener)
de-register listeners
 o setResourceFile(String)
Set the resource file to be used by the tagger.
 o wordReceived(WordEvent)
Receive a word event.

Constructor Detail

 o Tagger
public Tagger()
          constructor

Method Detail

 o setResourceFile
public void setResourceFile(java.lang.String location) throws TaggerException
          Set the resource file to be used by the tagger. The filename is the full pathname of the file.
Parameters:
location - where the resource file can be found.
 o getResourceFile
public java.lang.String getResourceFile()
 o wordReceived
public void wordReceived(WordEvent token)
          Receive a word event. A token is sent across from the tokeniser. This can either be an annotation or a proper word. The annotation is added to the annotation buffer, while the word goes to the tag buffer.
Parameters:
token - the WordEvent from the tokeniser.
 o addMarkup
public void addMarkup(WordEvent xml)
          Add an annotation. SGML tags are ignored by the tagger, so they are added separately. There is an array of SGML vectors parallel to the word buffer array, so that SGML markup is passed through the tagging process transparently. This function is equivalent to tag, but should be called with markup.
Parameters:
sgml - a String containing markup that should not be tagged
 o addWordListener
public void addWordListener(WordListener listener)
          register listeners
 o removeWordListener
public void removeWordListener(WordListener listener)
          de-register listeners