Edinburgh Speech Tools 2.4-release
 
Loading...
Searching...
No Matches
EST_relation_compare.h
1/*************************************************************************/
2/* */
3/* Centre for Speech Technology Research */
4/* University of Edinburgh, UK */
5/* Copyright (c) 1994,1995,1996 */
6/* All Rights Reserved. */
7/* */
8/* Permission is hereby granted, free of charge, to use and distribute */
9/* this software and its documentation without restriction, including */
10/* without limitation the rights to use, copy, modify, merge, publish, */
11/* distribute, sublicense, and/or sell copies of this work, and to */
12/* permit persons to whom this work is furnished to do so, subject to */
13/* the following conditions: */
14/* 1. The code must retain the above copyright notice, this list of */
15/* conditions and the following disclaimer. */
16/* 2. Any modifications must be clearly marked as such. */
17/* 3. Original authors' names are not deleted. */
18/* 4. The authors' names are not used to endorse or promote products */
19/* derived from this software without specific prior written */
20/* permission. */
21/* */
22/* THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK */
23/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
24/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
25/* SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE */
26/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
27/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
28/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
29/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
30/* THIS SOFTWARE. */
31/* */
32/*************************************************************************/
33/* Author : Paul Taylor */
34/* Date : May 1994 */
35/*-----------------------------------------------------------------------*/
36/* Label Comparison Routines */
37/* */
38/*=======================================================================*/
39
40#ifndef __EST_RELATION_COMPARE_H__
41#define __EST_RELATION_COMPARE_H__
42
43float label_distance1(EST_Item &ref, EST_Item &test);
44EST_Item *nthpos(EST_Relation &a, int n);
45void compare_labels(EST_Relation &reflab, EST_Relation &testlab);
46void relation_match(EST_Relation &a, EST_Relation &b);
47void function_match(EST_II_KVL &u, EST_Relation &a, EST_Relation &b);
48void monotonic_match(EST_II_KVL &a, EST_II_KVL &b);
49void show_links(EST_Relation &a, EST_Relation &b);
50int close_enough(EST_Item &a, EST_Item &b);
51int matrix_deletions(EST_FMatrix &m);
52int matrix_insertions(EST_FMatrix &m);
53void matrix_ceiling(EST_FMatrix &m, float max);
54void minimise_matrix_by_row(EST_FMatrix &m);
55void minimise_matrix_by_column(EST_FMatrix &m);
56int lowest_pos(EST_FMatrix &m, int j);
57float label_distance2(EST_Item &ref, EST_Item &test);
58
59
60void print_results(EST_Relation &ref, EST_Relation &test, EST_FMatrix &m, int tot,
61 int del, int ins, int v);
62void print_aligned_trans(EST_Relation &ref, EST_Relation &test, EST_FMatrix &m);
63void pos_only(EST_Relation &a);
64void print_s_trans(EST_Relation &a, int width=3);
65int num_b_deletions(EST_FMatrix &m, int last, int current);
66int num_b_insertions(EST_FMatrix &m, int last, int current);
67int column_hit(EST_FMatrix &m, int c);
68int row_hit(EST_FMatrix &m, int r);
69void print_matrix_scores(EST_Relation &ref, EST_Relation &test, EST_FMatrix &a);
70void print_i_d_scores(EST_FMatrix &m);
71void test_labels(EST_Utterance &ref, EST_Utterance &test, EST_Option &op);
72int commutate(EST_Item *a_ptr, EST_II_KVL &f1, EST_II_KVL &f2,
74
75void reassign_links(EST_Relation &a, EST_II_KVL &u, EST_String stream_type);
76void reassign_links(EST_Relation &a, EST_Relation &b, EST_II_KVL &ua, EST_II_KVL &ub);
77int compare_labels(EST_Utterance &ref, EST_Utterance &test, EST_String name,
79
80int insdel(EST_II_KVL &a);
81void error_location(EST_Relation &e, EST_FMatrix &m, int ref);
82void multiple_matrix_compare(EST_TList<EST_Relation> &rmlf, EST_TList<EST_Relation>
84 method, float t, int v);
85
87 float t, int v);
88
89void multiple_labels(EST_Relation &reflab);
90void threshold_labels(EST_Relation &reflab, float t);
91
92#endif //__EST_RELATION_COMPARE_H__