':param beam_threshold: Hypotheses that score less than this
factor of the best hypothesis are discarded from the stack.
Value must be between 0.0 and 1.0.
:type beam_threshold: float'

def __init__(self, max_size=100, beam_threshold=0.0):

    self.max_size = max_size
    self.items = []
    if (beam_threshold == 0.0):
        self.__log_beam_threshold = float('-inf')
    else:
        self.__log_beam_threshold = log(beam_threshold)
