org.annotation.wordfreak.annotator
Class POSAnnotator

java.lang.Object
  extended byorg.annotation.wordfreak.annotator.Annotator
      extended byorg.annotation.wordfreak.annotator.DocumentProcessor
          extended byorg.annotation.wordfreak.annotator.ParagraphProcessor
              extended byorg.annotation.wordfreak.annotator.SentenceProcessor
                  extended byorg.annotation.wordfreak.annotator.POSAnnotator
All Implemented Interfaces:
java.awt.event.ActionListener, AnnotatedFileListener, java.util.EventListener, Plugin

public abstract class POSAnnotator
extends SentenceProcessor


Field Summary
 
Fields inherited from class org.annotation.wordfreak.annotator.SentenceProcessor
sentenceTypes
 
Fields inherited from class org.annotation.wordfreak.annotator.Annotator
annotationFilter, dataDirectory, DEFAULT_ANNOTATOR_NAME, files, guiListener, listeners, loaded, progress, trainingFilter
 
Constructor Summary
POSAnnotator(java.lang.String type)
           
 
Method Summary
protected abstract  java.lang.String[] getPOSTags(java.lang.String[] toks, java.lang.String[] tags, double[] tprobs)
          Gets POS tags for the word sequence in toks.
protected abstract  java.lang.String[] getTags(java.lang.String[] toks, java.lang.String[] tags, int i)
          Returns sorted list of POS tags for the word at index i in the array of toks.
 void processSentence(Annotation sentence, double percentage)
          Processes the specified sentence which consisits of the specified percentage of total work to be performed by this annotator.
 java.lang.String[] sortedOutcomes(Annotation ann)
          Returns a sorted version of the possible outcomes.
protected abstract  void training(java.lang.String[] paths)
           
 
Methods inherited from class org.annotation.wordfreak.annotator.SentenceProcessor
processParagraph
 
Methods inherited from class org.annotation.wordfreak.annotator.ParagraphProcessor
processDocument
 
Methods inherited from class org.annotation.wordfreak.annotator.DocumentProcessor
annotating
 
Methods inherited from class org.annotation.wordfreak.annotator.Annotator
actionPerformed, addAnnotatorListener, annotate, annotatedFile, closeAnnotatedFile, done, getDataDirectory, hideWaitDialog, loadAnnotator, loaded, removeAnnotatorListener, setAnnotationFilter, setDataDirectory, setGuiListener, setProgress, setTrainingFilter, showWaitDialog, supportsTraining, train, updateProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSAnnotator

public POSAnnotator(java.lang.String type)
Method Detail

processSentence

public void processSentence(Annotation sentence,
                            double percentage)
Description copied from class: SentenceProcessor
Processes the specified sentence which consisits of the specified percentage of total work to be performed by this annotator.

Specified by:
processSentence in class SentenceProcessor
Parameters:
sentence - The sentence to be annotated.
percentage - The percentage of work this sentence represents.

getPOSTags

protected abstract java.lang.String[] getPOSTags(java.lang.String[] toks,
                                                 java.lang.String[] tags,
                                                 double[] tprobs)
Gets POS tags for the word sequence in toks.

Parameters:
toks - Words.
tags - Pre-tag values.
tprobs - Probabilities that the tag assigned is the correct tag. The is populated by the function.
Returns:
Tags for each word in toks.

getTags

protected abstract java.lang.String[] getTags(java.lang.String[] toks,
                                              java.lang.String[] tags,
                                              int i)
Returns sorted list of POS tags for the word at index i in the array of toks.

Parameters:
toks - An array of words.
tags - An array of tags for the words in toks.
i - An index into toks.
Returns:
Sorted list of POS tags for word i.

training

protected abstract void training(java.lang.String[] paths)
Overrides:
training in class Annotator

sortedOutcomes

public java.lang.String[] sortedOutcomes(Annotation ann)
Description copied from class: Annotator
Returns a sorted version of the possible outcomes. Presumably the most likely outcomes are placed first which can help the annotator if a large number of outcomes is to be considered.

Overrides:
sortedOutcomes in class Annotator
Returns:
a sorted array of outcomes with the most likly outcome in position 0.


Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.