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 https://docs.syntheticlearner.net/tde/measures/index.html 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

compute_boundary()[source]

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

Parameters

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

Gold_boundaries_down

a set of all the downward gold boundaries

Gold_boundaries_up

a set of all the upward gold boundaries

property fscore
write_score()