-
Notifications
You must be signed in to change notification settings - Fork 5
Decoding Strategies
Jinho D. Choi edited this page Feb 11, 2015
·
5 revisions
- 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 theclassifier
. - 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.
- Create classes
GreedyTagger
,ExhaustiveTagger
,TopTagger
, andBeamTagger
. - Override the
decode
methods using greedy, exhaustive, top, and beam decoding strategies. - Reference:
DSUtils
.
- Test your decoding strategies using
TaggerTest
.
- Complete the
TopKTagger
class such that it considers the top-k highest probable predictions at each state. Run yourTopKTagger
usingTaggerTest
, wherek = 3
. Submit your code and the results fromTaggerTest
.
©2015 Emory University