class_docstr: Decodes a given sequence using the Viterbi algorithm.
class_docstr_tok: ["Decodes","a","given","sequence","using","the","Viterbi","algorithm","."]
docstr: Initialize the Viterbi Decoder.
  
  Args:
      tag_dictionary: Dictionary of tags for sequence labeling task
docstr_tok: ["Initialize","the","Viterbi","Decoder",".","Args",":","tag_dictionary",":","Dictionary","of","tags","for","sequence","labeling","task"]
code: def __init__(self, tag_dictionary: Dictionary) -> None:
      """Initialize the Viterbi Decoder.
  
      Args:
          tag_dictionary: Dictionary of tags for sequence labeling task
      """
      self.tag_dictionary = tag_dictionary
      self.tagset_size = len(tag_dictionary)
      self.start_tag = tag_dictionary.get_idx_for_item(START_TAG)
      self.stop_tag = tag_dictionary.get_idx_for_item(STOP_TAG)
  
file_path: flair/flair/models/sequence_tagger_utils/viterbi.py
imports: from typing import Tuple
  import numpy
  import torch
  import torch.nn
  from torch.nn.functional import softmax
  from torch.nn.utils.rnn import pack_padded_sequence
  import flair
  from flair.data import Dictionary, Label, List, Sentence
label_desc: Use image node_id 1 to create a new ViterbiDecoder object  with example: obj = ViterbiDecoder(tag_dictionary)