Boundary Measure

class tde.measures.boundary.Boundary(gold, disc, output_folder=None)[source]

Bases: tde.measures.measures.Measure

Boundary measure

The boundary measures how many ‘Gold’ boundaries were found. See for a summary of all measures.

Input :param disc: Discovered Object, contains the discovered boundaries :param gold: Gold object, contains all the gold boundaries :param output_folder: string, path to the output folder

Output :param precision: Boundary Precision :param recall: Boundary Recall

property precision

Return Token and Type precision

property recall

Return Token and Type recall


Create intervaltree containing only boundary phones. Here we discriminate upward and downward boundaries, because if a word is followed by a silence, the upward boundary should be counted if discovered as upward, but not if discovered as downward.

Input :param disc_down: a list of all the downward boundaries of

discovered segments


disc_up – a list of all the upward boundaries of discovered segments


a set of all the downward gold boundaries


a set of all the upward gold boundaries

property fscore