Class POSAnnotator

  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
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
Methods inherited from class org.annotation.wordfreak.annotator.ParagraphProcessor
Methods inherited from class org.annotation.wordfreak.annotator.DocumentProcessor
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


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


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
sentence - The sentence to be annotated.
percentage - The percentage of work this sentence represents.


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.

toks - Words.
tags - Pre-tag values.
tprobs - Probabilities that the tag assigned is the correct tag. The is populated by the function.
Tags for each word 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.

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


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


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.

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

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