de.dfki.lt.hog.modules.test
Class SampleTagger

java.lang.Object
  extended by de.dfki.lt.hog.Module
      extended by de.dfki.lt.hog.modules.test.SampleTagger

public class SampleTagger
extends Module

This is a pseudo tagger just for demonstration purposes. It gives a token a UPPER tag if this token starts with an upper case character.


Field Summary
 
Fields inherited from class de.dfki.lt.hog.Module
CONFIG_SEARCH_PATH_PROP, LINE_SEPARATOR, MODULE_DEPTH_PROP, MODULE_LANGUAGE_PROP, MODULE_NAME_PROP, MODULE_ROOTELEMENT_PROP, moduleLog, NO, NONE, ROOT, YES
 
Constructor Summary
SampleTagger(java.util.Properties taggerProps)
          Creates a Tagger with a given Properties object.
 
Method Summary
 java.lang.String process(java.lang.String processString)
          A sample tagger to illustrate communication with MoCoMan.
 org.w3c.dom.Node processDOMTree(org.w3c.dom.Node domTree)
           
 
Methods inherited from class de.dfki.lt.hog.Module
getAbsolutOrRelativePath, getConfig, getFileProperty, getMoCoMan, getModuleDepth, getModuleLanguage, getModuleName, getModuleRootElement, getProperty, getProperty, init, searchConfigFile, searchConfigFile, setConfig, setMoCoMan, setModuleDepth, setModuleLanguage, setModuleName, setModuleRootElement, setProperty, shutdown, suitable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleTagger

public SampleTagger(java.util.Properties taggerProps)
Creates a Tagger with a given Properties object.

Parameters:
taggerProps - configurates this Tagger
Method Detail

process

public java.lang.String process(java.lang.String processString)
A sample tagger to illustrate communication with MoCoMan. Tags values in a given XML string with UPPER or LOWER if their first characters are upper or lower case, repectively.

Specified by:
process in class Module
Parameters:
processString - XML string to process
Returns:
XML string with pos attributes

processDOMTree

public org.w3c.dom.Node processDOMTree(org.w3c.dom.Node domTree)
Specified by:
processDOMTree in class Module