In the base-Input: raw sentence sent -a list of characters Variables: candidate sentence item -a list of (word, tag) pairs; maximum word-length record maxlen for each tag; the agenda list agendas; the tag dictionary tagdict; start index for current word; end index for current word Initialization:  line POS tagger, candidates in the beam are tagged sequences ending with the current word, which can be compared directly with each other.
for the joint problem, candidates in the beam are segmented and tagged sequences up to the current character, where the last word can be a complete word or a partial word.