Skip to content

Decoding Strategies

Jinho D. Choi edited this page Feb 11, 2015 · 5 revisions

Abstract Tagger

  • Create a package cs325.tagger.
  • Download the TagList class.
  • Create an abstract class AbstractTagger.
  • Create a constructor.
  • @param classifier a multi-classifier.
  • Define a method addSentence.
  • Adds training instances from a sentences.
  • @param words the words in the sentence.
  • @param tags the pos-tags in the sentence.
  • Define a method train.
  • Calls the train method in the classifier.
  • Define a protected method getFeatures.
  • @return a list of string features from the current state.
  • @param words the list of words.
  • @param tags the list of previously found pos-tags.
  • @param index the current index.
  • Declare an abstract method decode.
  • @return the list of tags with the overall probability.
  • @param words the list of words.

Greedy, Exhaustive, Top, Beam Tagger

Unit Test

Quiz

  • Complete the TopKTagger class such that it considers the top-k highest probable predictions at each state. Run your TopKTagger using TaggerTest, where k = 3. Submit your code and the results from TaggerTest.

Artificial Intelligence

Instructor


Emory University

Clone this wiki locally